Skip to content

Commit 08967e2

Browse files
committed
TEMP: run 100x
1 parent 3683461 commit 08967e2

File tree

3 files changed

+171
-167
lines changed

3 files changed

+171
-167
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ jobs:
481481
needs: [job_get_metadata, job_build]
482482
if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
483483
runs-on: ubuntu-20.04
484-
timeout-minutes: 15
484+
timeout-minutes: 25
485485
strategy:
486486
fail-fast: false
487487
matrix:

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

Lines changed: 93 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -13,96 +13,98 @@ function isInputMutation(snap: incrementalData): snap is inputData {
1313
return snap.source == IncrementalSource.Input;
1414
}
1515

16-
sentryTest(
17-
'should mask input initial value and its changes',
18-
async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => {
19-
// TODO(replay): This is flakey on firefox where we do not always get the latest mutation.
20-
if (shouldSkipReplayTest() || browserName === 'firefox') {
21-
sentryTest.skip();
22-
}
23-
24-
const reqPromise0 = waitForReplayRequest(page, 0);
25-
const reqPromise1 = waitForReplayRequest(page, 1);
26-
const reqPromise2 = waitForReplayRequest(page, 2);
27-
const reqPromise3 = waitForReplayRequest(page, 3);
28-
29-
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
30-
return route.fulfill({
31-
status: 200,
32-
contentType: 'application/json',
33-
body: JSON.stringify({ id: 'test-id' }),
16+
for (let i = 0; i < 100; i++) {
17+
sentryTest(
18+
`should mask input initial value and its changes RUN ${i}`,
19+
async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => {
20+
// TODO(replay): This is flakey on firefox where we do not always get the latest mutation.
21+
if (shouldSkipReplayTest() || browserName === 'firefox') {
22+
sentryTest.skip();
23+
}
24+
25+
const reqPromise0 = waitForReplayRequest(page, 0);
26+
const reqPromise1 = waitForReplayRequest(page, 1);
27+
const reqPromise2 = waitForReplayRequest(page, 2);
28+
const reqPromise3 = waitForReplayRequest(page, 3);
29+
30+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
31+
return route.fulfill({
32+
status: 200,
33+
contentType: 'application/json',
34+
body: JSON.stringify({ id: 'test-id' }),
35+
});
3436
});
35-
});
36-
37-
const url = await getLocalTestPath({ testDir: __dirname });
38-
39-
await page.goto(url);
40-
41-
await reqPromise0;
42-
43-
const text = 'this is test text';
44-
45-
await page.locator('#input').type(text);
46-
await forceFlushReplay();
47-
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
48-
const lastSnapshot = snapshots[snapshots.length - 1];
49-
expect(lastSnapshot.text).toBe(text);
50-
51-
await page.locator('#input-masked').type(text);
52-
await forceFlushReplay();
53-
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
54-
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
55-
expect(lastSnapshot2.text).toBe('*'.repeat(text.length));
56-
57-
await page.locator('#input-ignore').type(text);
58-
await forceFlushReplay();
59-
const snapshots3 = getIncrementalRecordingSnapshots(await reqPromise3).filter(isInputMutation);
60-
expect(snapshots3.length).toBe(0);
61-
},
62-
);
63-
64-
sentryTest(
65-
'should mask textarea initial value and its changes',
66-
async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => {
67-
// TODO(replay): This is flakey on firefox where we do not always get the latest mutation.
68-
if (shouldSkipReplayTest() || browserName === 'firefox') {
69-
sentryTest.skip();
70-
}
71-
72-
const reqPromise0 = waitForReplayRequest(page, 0);
73-
const reqPromise1 = waitForReplayRequest(page, 1);
74-
const reqPromise2 = waitForReplayRequest(page, 2);
75-
const reqPromise3 = waitForReplayRequest(page, 3);
76-
77-
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
78-
return route.fulfill({
79-
status: 200,
80-
contentType: 'application/json',
81-
body: JSON.stringify({ id: 'test-id' }),
37+
38+
const url = await getLocalTestPath({ testDir: __dirname });
39+
40+
await page.goto(url);
41+
42+
await reqPromise0;
43+
44+
const text = 'this is test text';
45+
46+
await page.locator('#input').type(text);
47+
await forceFlushReplay();
48+
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
49+
const lastSnapshot = snapshots[snapshots.length - 1];
50+
expect(lastSnapshot.text).toBe(text);
51+
52+
await page.locator('#input-masked').type(text);
53+
await forceFlushReplay();
54+
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
55+
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
56+
expect(lastSnapshot2.text).toBe('*'.repeat(text.length));
57+
58+
await page.locator('#input-ignore').type(text);
59+
await forceFlushReplay();
60+
const snapshots3 = getIncrementalRecordingSnapshots(await reqPromise3).filter(isInputMutation);
61+
expect(snapshots3.length).toBe(0);
62+
},
63+
);
64+
65+
sentryTest(
66+
`should mask textarea initial value and its changes RUN ${i}`,
67+
async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => {
68+
// TODO(replay): This is flakey on firefox where we do not always get the latest mutation.
69+
if (shouldSkipReplayTest() || browserName === 'firefox') {
70+
sentryTest.skip();
71+
}
72+
73+
const reqPromise0 = waitForReplayRequest(page, 0);
74+
const reqPromise1 = waitForReplayRequest(page, 1);
75+
const reqPromise2 = waitForReplayRequest(page, 2);
76+
const reqPromise3 = waitForReplayRequest(page, 3);
77+
78+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
79+
return route.fulfill({
80+
status: 200,
81+
contentType: 'application/json',
82+
body: JSON.stringify({ id: 'test-id' }),
83+
});
8284
});
83-
});
84-
85-
const url = await getLocalTestPath({ testDir: __dirname });
86-
87-
await page.goto(url);
88-
await reqPromise0;
89-
90-
const text = 'this is test text';
91-
await page.locator('#textarea').type(text);
92-
await forceFlushReplay();
93-
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
94-
const lastSnapshot = snapshots[snapshots.length - 1];
95-
expect(lastSnapshot.text).toBe(text);
96-
97-
await page.locator('#textarea-masked').type(text);
98-
await forceFlushReplay();
99-
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
100-
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
101-
expect(lastSnapshot2.text).toBe('*'.repeat(text.length));
102-
103-
await page.locator('#textarea-ignore').type(text);
104-
await forceFlushReplay();
105-
const snapshots3 = getIncrementalRecordingSnapshots(await reqPromise3).filter(isInputMutation);
106-
expect(snapshots3.length).toBe(0);
107-
},
108-
);
85+
86+
const url = await getLocalTestPath({ testDir: __dirname });
87+
88+
await page.goto(url);
89+
await reqPromise0;
90+
91+
const text = 'this is test text';
92+
await page.locator('#textarea').type(text);
93+
await forceFlushReplay();
94+
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
95+
const lastSnapshot = snapshots[snapshots.length - 1];
96+
expect(lastSnapshot.text).toBe(text);
97+
98+
await page.locator('#textarea-masked').type(text);
99+
await forceFlushReplay();
100+
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
101+
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
102+
expect(lastSnapshot2.text).toBe('*'.repeat(text.length));
103+
104+
await page.locator('#textarea-ignore').type(text);
105+
await forceFlushReplay();
106+
const snapshots3 = getIncrementalRecordingSnapshots(await reqPromise3).filter(isInputMutation);
107+
expect(snapshots3.length).toBe(0);
108+
},
109+
);
110+
}

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

Lines changed: 77 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -13,86 +13,88 @@ function isInputMutation(snap: incrementalData): snap is inputData {
1313
return snap.source == IncrementalSource.Input;
1414
}
1515

16-
sentryTest(
17-
'should mask input initial value and its changes from `maskAllInputs` and allow unmasked selector',
18-
async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => {
19-
// TODO(replay): This is flakey on firefox where we do not always get the latest mutation.
20-
if (shouldSkipReplayTest() || browserName === 'firefox') {
21-
sentryTest.skip();
22-
}
23-
24-
const reqPromise0 = waitForReplayRequest(page, 0);
25-
const reqPromise1 = waitForReplayRequest(page, 1);
26-
const reqPromise2 = waitForReplayRequest(page, 2);
27-
28-
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
29-
return route.fulfill({
30-
status: 200,
31-
contentType: 'application/json',
32-
body: JSON.stringify({ id: 'test-id' }),
16+
for (let i = 0; i < 100; i++) {
17+
sentryTest(
18+
`should mask input initial value and its changes from maskAllInputs and allow unmasked selector RUN ${i}`,
19+
async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => {
20+
// TODO(replay): This is flakey on firefox where we do not always get the latest mutation.
21+
if (shouldSkipReplayTest() || browserName === 'firefox') {
22+
sentryTest.skip();
23+
}
24+
25+
const reqPromise0 = waitForReplayRequest(page, 0);
26+
const reqPromise1 = waitForReplayRequest(page, 1);
27+
const reqPromise2 = waitForReplayRequest(page, 2);
28+
29+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
30+
return route.fulfill({
31+
status: 200,
32+
contentType: 'application/json',
33+
body: JSON.stringify({ id: 'test-id' }),
34+
});
3335
});
34-
});
35-
36-
const url = await getLocalTestPath({ testDir: __dirname });
37-
38-
await page.goto(url);
39-
40-
await reqPromise0;
41-
42-
const text = 'this is test text';
43-
44-
await page.locator('#input').type(text);
45-
await forceFlushReplay();
46-
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
47-
const lastSnapshot = snapshots[snapshots.length - 1];
48-
expect(lastSnapshot.text).toBe('*'.repeat(text.length));
49-
50-
await page.locator('#input-unmasked').type(text);
51-
await forceFlushReplay();
52-
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
53-
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
54-
expect(lastSnapshot2.text).toBe(text);
55-
},
56-
);
57-
58-
sentryTest(
59-
'should mask textarea initial value and its changes from `maskAllInputs` and allow unmasked selector',
60-
async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => {
61-
// TODO(replay): This is flakey on firefox where we do not always get the latest mutation.
62-
if (shouldSkipReplayTest() || browserName === 'firefox') {
63-
sentryTest.skip();
64-
}
65-
66-
const reqPromise0 = waitForReplayRequest(page, 0);
67-
const reqPromise1 = waitForReplayRequest(page, 1);
68-
const reqPromise2 = waitForReplayRequest(page, 2);
69-
70-
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
71-
return route.fulfill({
72-
status: 200,
73-
contentType: 'application/json',
74-
body: JSON.stringify({ id: 'test-id' }),
36+
37+
const url = await getLocalTestPath({ testDir: __dirname });
38+
39+
await page.goto(url);
40+
41+
await reqPromise0;
42+
43+
const text = 'this is test text';
44+
45+
await page.locator('#input').type(text);
46+
await forceFlushReplay();
47+
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
48+
const lastSnapshot = snapshots[snapshots.length - 1];
49+
expect(lastSnapshot.text).toBe('*'.repeat(text.length));
50+
51+
await page.locator('#input-unmasked').type(text);
52+
await forceFlushReplay();
53+
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
54+
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
55+
expect(lastSnapshot2.text).toBe(text);
56+
},
57+
);
58+
59+
sentryTest(
60+
`should mask textarea initial value and its changes from maskAllInputs and allow unmasked selector RUN ${i}`,
61+
async ({ browserName, forceFlushReplay, getLocalTestPath, page }) => {
62+
// TODO(replay): This is flakey on firefox where we do not always get the latest mutation.
63+
if (shouldSkipReplayTest() || browserName === 'firefox') {
64+
sentryTest.skip();
65+
}
66+
67+
const reqPromise0 = waitForReplayRequest(page, 0);
68+
const reqPromise1 = waitForReplayRequest(page, 1);
69+
const reqPromise2 = waitForReplayRequest(page, 2);
70+
71+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
72+
return route.fulfill({
73+
status: 200,
74+
contentType: 'application/json',
75+
body: JSON.stringify({ id: 'test-id' }),
76+
});
7577
});
76-
});
7778

78-
const url = await getLocalTestPath({ testDir: __dirname });
79+
const url = await getLocalTestPath({ testDir: __dirname });
7980

80-
await page.goto(url);
81+
await page.goto(url);
8182

82-
await reqPromise0;
83+
await reqPromise0;
8384

84-
const text = 'this is test text';
85+
const text = 'this is test text';
8586

86-
await page.locator('#textarea').type(text);
87-
await forceFlushReplay();
88-
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
89-
const lastSnapshot = snapshots[snapshots.length - 1];
90-
expect(lastSnapshot.text).toBe('*'.repeat(text.length));
87+
await page.locator('#textarea').type(text);
88+
await forceFlushReplay();
89+
const snapshots = getIncrementalRecordingSnapshots(await reqPromise1).filter(isInputMutation);
90+
const lastSnapshot = snapshots[snapshots.length - 1];
91+
expect(lastSnapshot.text).toBe('*'.repeat(text.length));
9192

92-
await page.locator('#textarea-unmasked').type(text);
93-
await forceFlushReplay();
94-
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
95-
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
96-
expect(lastSnapshot2.text).toBe(text);
97-
},
98-
);
93+
await page.locator('#textarea-unmasked').type(text);
94+
await forceFlushReplay();
95+
const snapshots2 = getIncrementalRecordingSnapshots(await reqPromise2).filter(isInputMutation);
96+
const lastSnapshot2 = snapshots2[snapshots2.length - 1];
97+
expect(lastSnapshot2.text).toBe(text);
98+
},
99+
);
100+
}

0 commit comments

Comments
 (0)