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]: page.clock does not update the time within the service worker #31772

Öffnen Sie
Flashantik opened this issue Jul 19, 2024 · 1 comment
Öffnen Sie

Kommentare

@Flashantik
Copy link

Flashantik commented Jul 19, 2024

Version

1.45.2

Steps to reproduce

In the test, we set the time as follows:

await page.clock.install({ time: "2024-07-19T09:00:00.000Z" });

Then, we retrieve the time in both the application code and within the service worker.

Screenshot 2024-07-19 at 15 20 40

Expected behavior

The time should be updated both in the application and in the service worker.

Actual behavior

The time is updated only in the application, but the service worker retains the current system time.

Additional context

No response

Environment

System:
    OS: macOS 14.1
    CPU: (8) arm64 Apple M1
    Memory: 172.27 MB / 16.00 GB
  Binaries:
    Node: 22.2.0 - ~/.nvm/versions/node/v22.2.0/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v22.2.0/bin/npm
    pnpm: 8.15.6 - /opt/homebrew/bin/pnpm
    bun: 1.1.20 - ~/.bun/bin/bun
  IDEs:
    VSCode: 1.91.1 - /usr/local/bin/code
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: ^1.45.2 => 1.45.2
@dgozman
Copy link
Contributor

dgozman commented Jul 22, 2024

@Flashantik Thank you for the issue. I can confirm, page.clock does not mess with service workers as of today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants