diff --git a/tests/library/tracing.spec.ts b/tests/library/tracing.spec.ts index 6c125da67c..a15f5f905c 100644 --- a/tests/library/tracing.spec.ts +++ b/tests/library/tracing.spec.ts @@ -182,7 +182,9 @@ test('should collect two traces', async ({ context, page, server }, testInfo) => } }); -test('should respect tracesDir and name', async ({ browserType, server }, testInfo) => { +test('should respect tracesDir and name', async ({ browserType, server, mode }, testInfo) => { + test.skip(mode === 'service', 'Service ignores tracesDir'); + const tracesDir = testInfo.outputPath('traces'); const browser = await browserType.launch({ tracesDir }); const context = await browser.newContext(); diff --git a/tests/page/locator-is-visible.spec.ts b/tests/page/locator-is-visible.spec.ts index e4203a0f5f..cbce1026b6 100644 --- a/tests/page/locator-is-visible.spec.ts +++ b/tests/page/locator-is-visible.spec.ts @@ -88,15 +88,13 @@ it('isVisible inside a role=button', async ({ page }) => { it('isVisible during navigation should not throw', async ({ page, server }) => { for (let i = 0; i < 20; i++) { - // Make sure previous navigation finishes, to avoid page.setContent throwing. - await page.waitForTimeout(100); await page.setContent(` - `); + `).catch(() => {}); // Avoid page.setContent throwing becuase of scheduled navigation. expect(await page.locator('div').isVisible()).toBe(false); } });