mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
test: unflake sync predicate test (#6654)
Ensure that requests come in order by awaiting them.
This commit is contained in:
parent
754ee13c93
commit
8cc103f43e
@ -91,10 +91,10 @@ it('sync predicate should be only called once', async ({page, server}) => {
|
||||
++counter;
|
||||
return response.url() === server.PREFIX + '/digits/1.png';
|
||||
}),
|
||||
page.evaluate(() => {
|
||||
fetch('/digits/1.png');
|
||||
fetch('/digits/2.png');
|
||||
fetch('/digits/3.png');
|
||||
page.evaluate(async () => {
|
||||
await fetch('/digits/1.png');
|
||||
await fetch('/digits/2.png');
|
||||
await fetch('/digits/3.png');
|
||||
})
|
||||
]);
|
||||
expect(response.url()).toBe(server.PREFIX + '/digits/1.png');
|
||||
|
Loading…
Reference in New Issue
Block a user