Skip to content

Commit d219af5

Browse files
committed
Fix merge issues
1 parent 093dc65 commit d219af5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

docs/sources/next/using-k6-browser/recommended-practices/simulate-user-input-delay.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 04
66

77
# Simulate user input delay
88

9-
We will demonstrate how best to work with `sleep` in `k6` and the various `wait*` prepended methods that are available in `k6/browser` to simulate user input delay, wait for navigations, and wait for element state changes. By the end of this page, you should be able to successfully use the correct API where necessary.
9+
On this page, you'll learn how to best work with `sleep` in `k6` and the various `wait*` prepended methods available in `k6/browser` to simulate user input delay, wait for navigations, and wait for element state changes. By the end of this page, you should be able to successfully use the correct API where necessary.
1010

1111
{{< admonition type="note" >}}
1212

@@ -88,7 +88,7 @@ export default async function () {
8888
});
8989

9090
await check(ok, {
91-
'waitForFunction successfully resolved': async (ok) => await ok.innerHTML() == 'Hello'
91+
'waitForFunction successfully resolved': async (ok) => (await ok.innerHTML()) == 'Hello',
9292
});
9393
} finally {
9494
await page.close();
@@ -176,10 +176,7 @@ export default async function () {
176176

177177
// The click action will start a navigation, and the waitForNavigation
178178
// will help the test wait until the navigation completes.
179-
await Promise.all([
180-
page.waitForNavigation(),
181-
submitButton.click(),
182-
]);
179+
await Promise.all([page.waitForNavigation(), submitButton.click()]);
183180
} finally {
184181
await page.close();
185182
}

0 commit comments

Comments
 (0)