Skip to content

Commit a6a586c

Browse files
committed
change order of actions and awaiting requests
1 parent becea29 commit a6a586c

File tree

1 file changed

+10
-7
lines changed
  • packages/integration-tests/suites/replay/requests

1 file changed

+10
-7
lines changed

packages/integration-tests/suites/replay/requests/test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ for (let i = 0; i < 25; i++) {
3232
const url = await getLocalTestPath({ testDir: __dirname });
3333

3434
await page.goto(url);
35-
await page.click('#fetch');
36-
// await page.click('#go-background');
37-
35+
await page.click('#go-background');
3836
const { performanceSpans: spans0 } = getReplayRecordingContent(await reqPromise0);
37+
38+
await page.click('#fetch');
39+
await page.click('#go-background');
3940
const { performanceSpans: spans1 } = getReplayRecordingContent(await reqPromise1);
40-
const performanceSpans = [...spans0, ...spans1];
4141

42+
const performanceSpans = [...spans0, ...spans1];
4243
expect(performanceSpans).toContainEqual(expectedFetchPerformanceSpan);
4344
});
4445

@@ -69,11 +70,13 @@ for (let i = 0; i < 25; i++) {
6970
const url = await getLocalTestPath({ testDir: __dirname });
7071

7172
await page.goto(url);
72-
await page.click('#xhr');
73-
// await page.click('#go-background');
74-
73+
await page.click('#go-background');
7574
const { performanceSpans: spans0 } = getReplayRecordingContent(await reqPromise0);
75+
76+
await page.click('#xhr');
77+
await page.click('#go-background');
7678
const { performanceSpans: spans1 } = getReplayRecordingContent(await reqPromise1);
79+
7780
const performanceSpans = [...spans0, ...spans1];
7881

7982
expect(performanceSpans).toContainEqual(expectedXHRPerformanceSpan);

0 commit comments

Comments
 (0)