Version
1.46.1
Steps to reproduce
- Call this func to stop time:
export async function stopTime(page) {
await page.clock.install();
await page.clock.pauseAt(Date.now());
}
Expected behavior
Time is stopped at current time
Actual behavior
Sometimes I have this error:
Error: clock.pauseAt: Error: Cannot fast-forward to the past
at ClockController._innerFastForwardTo (<anonymous>:164:13)
at ClockController.pauseAt (<anonymous>:116:16)
at eval (eval at evaluate (:234:30), <anonymous>:1:33)
at eval (<anonymous>)
at UtilityScript.evaluate (<anonymous>:234:30)
at UtilityScript.<anonymous> (<anonymous>:1:44)
at ClockController._innerFastForwardTo (/app/<anonymous>:164:13)
at ClockController.pauseAt (/app/<anonymous>:116:16)
at eval (/app/eval at evaluate (:234:30), <anonymous>:1:33)
at UtilityScript.evaluate (/app/<anonymous>:234:30)
at UtilityScript.<anonymous> (/app/<anonymous>:1:44)
at stopTime (/app/uitests/utils/playwrightClock.ts:11:22)
at /app/uitests/tests/mytest.spec.ts:213:13
Additional context
No response
Environment
System:
OS: macOS 13.5
CPU: (8) arm64 Apple M2
Memory: 98.86 MB / 16.00 GB
Binaries:
Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/test: 1.46.1 => 1.46.1
Version
1.46.1
Steps to reproduce
Expected behavior
Time is stopped at current time
Actual behavior
Sometimes I have this error:
Additional context
No response
Environment
System: OS: macOS 13.5 CPU: (8) arm64 Apple M2 Memory: 98.86 MB / 16.00 GB Binaries: Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm Languages: Bash: 3.2.57 - /bin/bash npmPackages: @playwright/test: 1.46.1 => 1.46.1