Skip to content

Feat: automated QA tests #2623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Feat: automated QA tests #2623

wants to merge 18 commits into from

Conversation

angela-tran
Copy link
Member

No description provided.

@angela-tran angela-tran self-assigned this Jan 11, 2025
Copy link

github-actions bot commented Jan 11, 2025

Coverage report

This PR does not seem to contain any modification to coverable code.

@github-actions github-actions bot added the tests Related to automated testing (unit, UI, integration, etc.) label Jan 11, 2025
@angela-tran angela-tran force-pushed the feat/playwright-headed-mode branch 5 times, most recently from daca2a0 to 42d81f8 Compare February 5, 2025 20:32
Base automatically changed from feat/playwright-headed-mode to main February 6, 2025 00:03
@angela-tran
Copy link
Member Author

angela-tran commented Mar 13, 2025

I was looking over the open pull requests just now and noticed this PR needed to be rebased. It was an easy one, so went ahead and did it.

Hopefully we'll have some time in the next slush time to finish this up.

@angela-tran
Copy link
Member Author

angela-tran commented Apr 7, 2025

We had some discussion for this PR, around improving how test config is done as well as adding documentation:

Config file to setup data that is currently in environment variables.

  • We can start by setting env_file to tests/playwright/.env in the playwright service for this PR
  • Commit a tests/playwright/.env.sample file with example variables
  • Basic docs page with getting started steps

On the config piece, I think it would be well worth it to go ahead and implement a YAML config file, similar to what we do in cal-itp/littlepay, for the tests rather than the interim .env setup that's described by our workshop notes.

The blockers have been (1) not having time to spend on this and (2) uncertainty around what the schema of the YAML file should be.

This would be great to look at during our in-person workshop day.

@thekaveman
Copy link
Member

I had a thought related to our experience with timeouts not really working for some pages...

We're currently using the playwright.sync_api to e.g. import the Page object and expect helper:

from playwright.sync_api import Page, expect


def test_dev_healthcheck(page: Page):
    page.goto("/healthcheck")

    expect(page.get_by_text("Healthy")).to_be_visible()

If we made the small change to use playwright.async_api, that might avoid the need for the .wait_for_timeout() calls:

from playwright.async_api import Page, expect


async def test_dev_healthcheck(page: Page):
    await page.goto("/healthcheck")

    await expect(page.get_by_text("Healthy")).to_be_visible()

@thekaveman thekaveman changed the title Feat: smoke tests Feat: automated QA tests May 19, 2025
@lalver1 lalver1 force-pushed the feat/smoke-tests branch from 44f0ab5 to 6fb0b90 Compare May 28, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Related to automated testing (unit, UI, integration, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants