Fixes #32706.
This commit is contained in:
parent
937424fb59
commit
f96b487030
|
|
@ -60,6 +60,8 @@ export class TimeoutManager {
|
|||
|
||||
setIgnoreTimeouts() {
|
||||
this._ignoreTimeouts = true;
|
||||
if (this._running)
|
||||
this._updateTimeout(this._running);
|
||||
}
|
||||
|
||||
interrupt() {
|
||||
|
|
|
|||
|
|
@ -872,3 +872,25 @@ test('should allow dynamic import in evaluate', async ({ runInlineTest, server }
|
|||
expect(result.exitCode).toBe(0);
|
||||
expect(result.passed).toBe(1);
|
||||
});
|
||||
|
||||
test('page.pause() should disable test timeout', async ({ runInlineTest }) => {
|
||||
const result = await runInlineTest({
|
||||
'a.test.ts': `
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test('test', async ({ page }) => {
|
||||
test.setTimeout(2000);
|
||||
|
||||
await Promise.race([
|
||||
page.pause(),
|
||||
new Promise(f => setTimeout(f, 3000)),
|
||||
]);
|
||||
|
||||
console.log('success!');
|
||||
});
|
||||
`,
|
||||
}, { headed: true });
|
||||
expect(result.exitCode).toBe(0);
|
||||
expect(result.passed).toBe(1);
|
||||
expect(result.output).toContain('success!');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue