Skip to content

Add E2E tests for main accounts dashboard#866

Merged
rwood-moz merged 2 commits into
mainfrom
testing/codex-add-e2e
May 29, 2026
Merged

Add E2E tests for main accounts dashboard#866
rwood-moz merged 2 commits into
mainfrom
testing/codex-add-e2e

Conversation

@rwood-moz

@rwood-moz rwood-moz commented May 25, 2026

Copy link
Copy Markdown
Contributor

What changed?

Add E2E tests to validate the main TB Accounts dashboard.

Why?

To expand the current E2E test suite.

Limitations and Notes

This test will skip if it is running on local dev stack because when running on a local stack (i.e. on PRs in CI) there won't be a TB Pro subscription setup. In the future (#771) we will add a subscribe step when running the tests on a new local dev stack, and after that this test can also be enabled to run there. In the mean time this new test will run on stage after main merges, and on prod in the nightly test suite (on mobile and desktop).

My first patch primarily developed by Codex.

Applicable Issues

Fixes #313.

Screenshots

BrowserStack links running the new dashboard tests:

@rwood-moz rwood-moz force-pushed the testing/codex-add-e2e branch 3 times, most recently from cc750c2 to 3cb5fbd Compare May 26, 2026 15:14
@rwood-moz rwood-moz changed the title WIP: Add E2E tests for main accounts dashboard Add E2E tests for main accounts dashboard May 26, 2026
@rwood-moz rwood-moz marked this pull request as ready for review May 26, 2026 15:22
@rwood-moz rwood-moz requested review from MelissaAutumn and davinotdavid and removed request for MelissaAutumn and davinotdavid May 26, 2026 15:24

@davinotdavid davinotdavid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Confirmed that all tests pass while pointing to stage and using a stage account that has a subscription:

Image

One question though:

Comment thread test/e2e/pages/dashboard-page.ts
@rwood-moz rwood-moz force-pushed the testing/codex-add-e2e branch from 3cb5fbd to bf81622 Compare May 29, 2026 17:28
@rwood-moz rwood-moz requested a review from davinotdavid May 29, 2026 17:28

@davinotdavid davinotdavid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update! Sorry now the tests no longer seem to pass for me pointing to stage due to the URL not matching though :(

Comment thread test/e2e/pages/dashboard-page.ts Outdated

await expect.poll(async () => popup.url()).not.toBe('about:blank');
expect(new URL(popup.url()).protocol).toMatch(/^https?:$/);
expect(new URL(popup.url()).host).toBe(PADDLE_HOST);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should do toContain here instead or change the PADDLE_HOST to be environment aware as stage's URL I believe is sandbox-customer-portal.paddle.com instead

Suggested change
expect(new URL(popup.url()).host).toBe(PADDLE_HOST);
expect(new URL(popup.url()).host).toContain(PADDLE_HOST);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh yes I tested on prod not stage, good point. Updated to use toContain so we don't need to use more env (and GHA secrets). Thanks :)

Comment thread test/e2e/const/constants.ts
@rwood-moz rwood-moz requested a review from davinotdavid May 29, 2026 18:24

@davinotdavid davinotdavid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks!

@rwood-moz

Copy link
Copy Markdown
Contributor Author

lgtm! thanks!

Thank you for your thorough review, much appreciated!

@rwood-moz rwood-moz merged commit 0918974 into main May 29, 2026
8 checks passed
@rwood-moz rwood-moz deleted the testing/codex-add-e2e branch May 29, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add E2E tests for the main TB Accounts dashboard

2 participants