mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-30 23:45:33 +03:00
test: improve click-during-navigation (#11252)
This commit is contained in:
parent
5527437238
commit
ee0ea82d46
@ -18,13 +18,13 @@
|
||||
import { test as it } from './pageTest';
|
||||
|
||||
it('should not fail with internal error upon navigation', async ({ page, server }) => {
|
||||
it.slow();
|
||||
(async () => {
|
||||
while (true) {
|
||||
await page.goto(server.PREFIX + '/input/button.html').catch(() => {});
|
||||
await page.waitForTimeout(100).catch(() => {});
|
||||
}
|
||||
})();
|
||||
for (let i = 0; i < 100; ++i)
|
||||
await page.click('button');
|
||||
await page.goto(server.PREFIX + '/input/button.html');
|
||||
let triggered = false;
|
||||
const __testHookAfterStable = () => {
|
||||
if (triggered)
|
||||
return;
|
||||
triggered = true;
|
||||
return page.goto(server.PREFIX + '/input/button.html');
|
||||
};
|
||||
await page.click('button', { __testHookAfterStable } as any);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user