Skip to content

Commit

Permalink
Add 100ms between navigation events to capture some duration between …
Browse files Browse the repository at this point in the history
…events
  • Loading branch information
kamilogorek committed Jun 1, 2021
1 parent 711942a commit 6329ffd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { expectRequestCount, waitForAll, isSessionRequest, expectSession } = require('../utils');
const { expectRequestCount, waitForAll, isSessionRequest, expectSession, sleep } = require('../utils');

module.exports = async ({ page, url, requests }) => {
await waitForAll([page.goto(`${url}/healthy`), page.waitForRequest(isSessionRequest)]);
Expand All @@ -9,6 +9,8 @@ module.exports = async ({ page, url, requests }) => {
errors: 0,
});

await sleep(100);

await waitForAll([
page.click('a#alsoHealthy'),
page.waitForRequest(isSessionRequest),
Expand All @@ -27,6 +29,8 @@ module.exports = async ({ page, url, requests }) => {
errors: 0,
});

await sleep(100);

await waitForAll([
page.click('a#healthy'),
page.waitForRequest(isSessionRequest),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = async ({ page, url, requests }) => {
});

await sleep(100);

await page.click('a#alsoHealthy');
await page.waitForRequest(isTransactionRequest);

Expand All @@ -32,6 +33,7 @@ module.exports = async ({ page, url, requests }) => {
});

await sleep(100);

await page.click('a#healthy');
await page.waitForRequest(isTransactionRequest);

Expand Down

0 comments on commit 6329ffd

Please sign in to comment.