Skip to content

Feat: automated QA tests#2623

Draft
angela-tran wants to merge 18 commits into
mainfrom
feat/smoke-tests
Draft

Feat: automated QA tests#2623
angela-tran wants to merge 18 commits into
mainfrom
feat/smoke-tests

Conversation

@angela-tran

Copy link
Copy Markdown
Member

No description provided.

@angela-tran angela-tran self-assigned this Jan 11, 2025
@github-actions

github-actions Bot commented Jan 11, 2025

Copy link
Copy Markdown
Contributor

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

angela-tran commented Mar 13, 2025

Copy link
Copy Markdown
Member Author

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

angela-tran commented Apr 7, 2025

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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