Skip to content

Add Playwright tests #39

Description

@dantownsend

We use Playwright to test other UI projects in the Piccolo ecosystem (see Piccolo Admin).

Playwright is a E2E / UI testing framework.

Phase 1

Approximate time needed: 1 to 2 hours, depending on existing knowledge of Playwright.

  • Create a new folder called something like e2e.
  • Create requirements/test-requirements.txt, containing Playwright and Pytest.
  • Create a Playwright test (e.g. e2e/test_homepage.py), which performs some simple tests - e.g. loading the homepage, entering something into the search bar, and submitting it.
  • Create scripts/run-tests.sh, which runs pytest.

Phase 2

Can be done in a separate PR.

Approximate time needed is 1 to 2 hours, depending on knowledge of GitHub actions.

  • Run the tests using GitHub actions for a range of Sphinx versions (e.g. v4, v5), and Python versions.
    • Build the static files (cd docs && make html)
    • Have a Pytest fixture like this, which serves the static files. Hint, you should be able to use something like this, as a simple Python static file server.
  • Save screenshots of the tests as build artefacts, so we can quickly check that the theme isn't broken on any Sphinx versions when reviewing a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershacktoberfestA good issue for someone contributing to Hacktoberfest.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions