mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: Improve clock doc (#31147)
This commit is contained in:
parent
2d7bbe4d73
commit
76b25e84cc
@ -106,7 +106,7 @@ Returns fake milliseconds since the unix epoch.
|
|||||||
* since: v1.45
|
* since: v1.45
|
||||||
- returns: <[int]>
|
- returns: <[int]>
|
||||||
|
|
||||||
Advances the clock to the the moment of the first scheduled timer, firing it.
|
Advances the clock to the moment of the first scheduled timer, firing it.
|
||||||
Fake timers must be installed.
|
Fake timers must be installed.
|
||||||
Returns fake milliseconds since the unix epoch.
|
Returns fake milliseconds since the unix epoch.
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ await page.goto('http://localhost:3333');
|
|||||||
// Tick through time manually, firing all timers in the process.
|
// Tick through time manually, firing all timers in the process.
|
||||||
// In this case, time will be updated in the screen 2 times.
|
// In this case, time will be updated in the screen 2 times.
|
||||||
await page.clock.runFor(2000);
|
await page.clock.runFor(2000);
|
||||||
await expect(locator).to_have_text('2/2/2024, 10:00:02 AM')
|
await expect(locator).to_have_text('2/2/2024, 10:00:02 AM');
|
||||||
```
|
```
|
||||||
|
|
||||||
```python async
|
```python async
|
||||||
|
@ -378,7 +378,7 @@ export function tokenize(str1: string): CSSTokenInterface[] {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const consumeEscape = function() {
|
const consumeEscape = function() {
|
||||||
// Assume the the current character is the \
|
// Assume the current character is the \
|
||||||
// and the next code point is not a newline.
|
// and the next code point is not a newline.
|
||||||
consume();
|
consume();
|
||||||
if (hexdigit(code)) {
|
if (hexdigit(code)) {
|
||||||
|
4
packages/playwright-core/types/types.d.ts
vendored
4
packages/playwright-core/types/types.d.ts
vendored
@ -17311,8 +17311,8 @@ export interface Clock {
|
|||||||
runToLastTimer(): Promise<number>;
|
runToLastTimer(): Promise<number>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Advances the clock to the the moment of the first scheduled timer, firing it. Fake timers must be installed.
|
* Advances the clock to the moment of the first scheduled timer, firing it. Fake timers must be installed. Returns
|
||||||
* Returns fake milliseconds since the unix epoch.
|
* fake milliseconds since the unix epoch.
|
||||||
*/
|
*/
|
||||||
runToNextTimer(): Promise<number>;
|
runToNextTimer(): Promise<number>;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user