Skip to content
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

test(e2e): add tests for budget edit #864

Closed
wants to merge 15 commits into from
Closed

Conversation

sidvishnoi
Copy link
Member

Context

Part of #610

Changes proposed in this pull request

@github-actions github-actions bot added area: popup Improvements or additions to extension popup area: tests Improvements or additions to tests area: pages Changes to any of extension's pages labels Jan 27, 2025
Copy link
Contributor

github-actions bot commented Jan 27, 2025

Extension builds preview

Name Link
Latest commit 38a7086
Latest job logs Run #13033515239
BadgeDownload
BadgeDownload

sidvishnoi

This comment was marked as duplicate.

sidvishnoi

This comment was marked as duplicate.

@sidvishnoi
Copy link
Member Author

Figuring out why worker gets reused here.. It's supposed to disconnect wallet after each file finishes running.

sidvishnoi

This comment was marked as duplicate.

sidvishnoi

This comment was marked as duplicate.

@sidvishnoi
Copy link
Member Author

Playwright Test reuses a single worker as much as it can to make testing faster, so multiple test files are usually run in a single worker one after another.
Workers are always shutdown after a test failure to guarantee pristine environment for following tests.

Sad here.

It doesn't call disconnectWallet at end of each test file (we need
afterAll for that) - it is called only once per worker.
sidvishnoi

This comment was marked as duplicate.

@github-actions github-actions bot added the area: background Improvements or additions to extension background script label Jan 28, 2025
sidvishnoi

This comment was marked as duplicate.

@sidvishnoi
Copy link
Member Author

So, connected fixture is buggy. Might explain flakiness of some tests. When connection fails (as wallet is already connected in that worker), that worker dies, and things start afresh - making them pass.

sidvishnoi

This comment was marked as duplicate.

sidvishnoi

This comment was marked as duplicate.

@sidvishnoi
Copy link
Member Author

sidvishnoi commented Jan 28, 2025

So...

afterAll: Declares an afterAll hook that is executed once per worker after all tests.
afterEach: Declares an afterEach hook that is executed after each test.

There's no way to run a hook before all tests in a file. A worker will share state across files. 🤦🏽

Filed microsoft/playwright#34519 to see if can get some hint there.

sidvishnoi

This comment was marked as duplicate.

@sidvishnoi
Copy link
Member Author

Closing this as it got too noisy with attempts on fixing flakiness. Will send fresh PR.

@sidvishnoi sidvishnoi closed this Jan 30, 2025
@sidvishnoi sidvishnoi deleted the e2e-budget-edit branch January 30, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: background Improvements or additions to extension background script area: pages Changes to any of extension's pages area: popup Improvements or additions to extension popup area: tests Improvements or additions to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant