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

Use worker scoped fixtures for integration tests #1813

Merged
merged 5 commits into from
Mar 29, 2023
Merged

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Mar 27, 2023

Avoid restarting the same fixture server over and over again for different tests in the same file. This starts just one server per test file. this allows us to reuse the running server for multiple tests creating less overhead

@Janpot Janpot added the test label Mar 27, 2023
Signed-off-by: Jan Potoms <2109932+Janpot@users.noreply.github.com>
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 27, 2023
Signed-off-by: Jan Potoms <2109932+Janpot@users.noreply.github.com>
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Mar 27, 2023
@Janpot Janpot mentioned this pull request Mar 28, 2023
@@ -10,4 +10,6 @@ export async function gotoIfNotCurrent(
if (pathname !== expectedPath) {
await page.goto(expectedPath, opts);
}

await page.waitForURL((url) => url.pathname === expectedPath);
Copy link
Member

@apedroferreira apedroferreira Mar 29, 2023

Choose a reason for hiding this comment

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

Would it work to replace all instances of page.waitForNavigation with this page.waitForURL?
I think that's what Playwright is recommending now anyway.
We could probably do it in a separate PR though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I already did a batch in #1699. Thought I had all of them.
But let's keep that for a follow up indeed

Copy link
Member

@apedroferreira apedroferreira left a comment

Choose a reason for hiding this comment

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

Looks clean!

@Janpot Janpot merged commit 5506ffc into master Mar 29, 2023
@Janpot Janpot deleted the worker-tests branch March 29, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants