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

[Bug] Reusable browser clock bug #31353

Closed
mxschmitt opened this issue Jun 18, 2024 · 0 comments · Fixed by #31357
Closed

[Bug] Reusable browser clock bug #31353

mxschmitt opened this issue Jun 18, 2024 · 0 comments · Fixed by #31357
Assignees
Labels

Comments

@mxschmitt
Copy link
Member

  1. Run the test twice
import { test, expect } from '@playwright/test';

test('has title', async ({ page }) => {
  await page.clock.setFixedTime(new Date('2020-01-01T00:00:00Z'));
  await page.goto("https://time-time.net/timer/digital-clock.php");
});
  1) [chromium]  example.spec.ts:3:5  has title ──────────────────────────────────────────────────

    Error: clock.setFixedTime: TypeError: Cannot read properties of undefined (reading 'controller')

        at eval (eval at evaluate (:226:30), <anonymous>:1:22)
        at eval (<anonymous>)
        at UtilityScript.evaluate (<anonymous>:226:30)
        at UtilityScript.<anonymous> (<anonymous>:1:44)
        at eval (/Users/maxschmitt/Developer/tmp/1509/eval at evaluate (:226:30), <anonymous>:1:22)
        at UtilityScript.evaluate (/Users/maxschmitt/Developer/tmp/1509/<anonymous>:226:30)
        at UtilityScript.<anonymous> (/Users/maxschmitt/Developer/tmp/1509/<anonymous>:1:44)
        at /Users/maxschmitt/Developer/tmp/1509/tests/example.spec.ts:4:20
@mxschmitt mxschmitt self-assigned this Jun 18, 2024
mxschmitt added a commit that referenced this issue Jun 19, 2024
We uninstall all the setInitScript but forgot to mark `installed` as
`false`.

Fixes #31353
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 a pull request may close this issue.

1 participant