Skip to content

Commit eb89070

Browse files
committed
remove bench
1 parent f836c0b commit eb89070

File tree

1 file changed

+82
-84
lines changed
  • packages/browser-integration-tests/suites/replay/clickBreadcrumbs

1 file changed

+82
-84
lines changed

packages/browser-integration-tests/suites/replay/clickBreadcrumbs/test.ts

Lines changed: 82 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -4,104 +4,102 @@ import { sentryTest } from '../../../utils/fixtures';
44
import { expectedClickBreadcrumb } from '../../../utils/replayEventTemplates';
55
import { getReplayRecordingContent, shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers';
66

7-
for (let i = 0; i < 100; i++) {
8-
sentryTest(
9-
`replay should have correct click breadcrumbs${i}`,
10-
async ({ forceFlushReplay, getLocalTestPath, page, browserName }) => {
11-
// TODO(replay): This is flakey on firefox and webkit where we do not always get the latest mutation.
12-
if (shouldSkipReplayTest() || ['firefox', 'webkit'].includes(browserName)) {
13-
sentryTest.skip();
14-
}
7+
sentryTest(
8+
'replay should have correct click breadcrumbs',
9+
async ({ forceFlushReplay, getLocalTestPath, page, browserName }) => {
10+
// TODO(replay): This is flakey on firefox and webkit where we do not always get the latest mutation.
11+
if (shouldSkipReplayTest() || ['firefox', 'webkit'].includes(browserName)) {
12+
sentryTest.skip();
13+
}
1514

16-
const reqPromise0 = waitForReplayRequest(page, 0);
17-
const reqPromise1 = waitForReplayRequest(page, 1);
15+
const reqPromise0 = waitForReplayRequest(page, 0);
16+
const reqPromise1 = waitForReplayRequest(page, 1);
1817

19-
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
20-
return route.fulfill({
21-
status: 200,
22-
contentType: 'application/json',
23-
body: JSON.stringify({ id: 'test-id' }),
24-
});
18+
await page.route('https://dsn.ingest.sentry.io/**/*', route => {
19+
return route.fulfill({
20+
status: 200,
21+
contentType: 'application/json',
22+
body: JSON.stringify({ id: 'test-id' }),
2523
});
24+
});
2625

27-
const url = await getLocalTestPath({ testDir: __dirname });
26+
const url = await getLocalTestPath({ testDir: __dirname });
2827

29-
await page.goto(url);
30-
await reqPromise0;
28+
await page.goto(url);
29+
await reqPromise0;
3130

32-
await page.click('#error');
33-
await page.click('#img');
34-
await page.click('.sentry-unmask');
35-
await forceFlushReplay();
36-
const req1 = await reqPromise1;
37-
const content1 = getReplayRecordingContent(req1);
38-
expect(content1.breadcrumbs).toEqual(
39-
expect.arrayContaining([
40-
{
41-
...expectedClickBreadcrumb,
42-
message: 'body > div#error.btn.btn-error[aria-label="An Error"]',
43-
data: {
44-
nodeId: expect.any(Number),
45-
node: {
46-
attributes: {
47-
'aria-label': '** *****',
48-
class: 'btn btn-error',
49-
id: 'error',
50-
role: 'button',
51-
},
52-
id: expect.any(Number),
53-
tagName: 'div',
54-
textContent: '** *****',
31+
await page.click('#error');
32+
await page.click('#img');
33+
await page.click('.sentry-unmask');
34+
await forceFlushReplay();
35+
const req1 = await reqPromise1;
36+
const content1 = getReplayRecordingContent(req1);
37+
expect(content1.breadcrumbs).toEqual(
38+
expect.arrayContaining([
39+
{
40+
...expectedClickBreadcrumb,
41+
message: 'body > div#error.btn.btn-error[aria-label="An Error"]',
42+
data: {
43+
nodeId: expect.any(Number),
44+
node: {
45+
attributes: {
46+
'aria-label': '** *****',
47+
class: 'btn btn-error',
48+
id: 'error',
49+
role: 'button',
5550
},
51+
id: expect.any(Number),
52+
tagName: 'div',
53+
textContent: '** *****',
5654
},
5755
},
58-
]),
59-
);
56+
},
57+
]),
58+
);
6059

61-
expect(content1.breadcrumbs).toEqual(
62-
expect.arrayContaining([
63-
{
64-
...expectedClickBreadcrumb,
65-
message: 'body > button > img#img[alt="Alt Text"]',
66-
data: {
67-
nodeId: expect.any(Number),
68-
node: {
69-
attributes: {
70-
alt: 'Alt Text',
71-
id: 'img',
72-
},
73-
id: expect.any(Number),
74-
tagName: 'img',
75-
textContent: '',
60+
expect(content1.breadcrumbs).toEqual(
61+
expect.arrayContaining([
62+
{
63+
...expectedClickBreadcrumb,
64+
message: 'body > button > img#img[alt="Alt Text"]',
65+
data: {
66+
nodeId: expect.any(Number),
67+
node: {
68+
attributes: {
69+
alt: 'Alt Text',
70+
id: 'img',
7671
},
72+
id: expect.any(Number),
73+
tagName: 'img',
74+
textContent: '',
7775
},
7876
},
79-
]),
80-
);
77+
},
78+
]),
79+
);
8180

82-
expect(content1.breadcrumbs).toEqual(
83-
expect.arrayContaining([
84-
{
85-
...expectedClickBreadcrumb,
86-
message: 'body > button.sentry-unmask[aria-label="Unmasked label"]',
87-
data: {
88-
nodeId: expect.any(Number),
89-
node: {
90-
attributes: {
91-
// TODO(rrweb): This is a bug in our rrweb fork!
92-
// This attribute should be unmasked.
93-
// 'aria-label': 'Unmasked label',
94-
'aria-label': '******** *****',
95-
class: 'sentry-unmask',
96-
},
97-
id: expect.any(Number),
98-
tagName: 'button',
99-
textContent: 'Unmasked',
81+
expect(content1.breadcrumbs).toEqual(
82+
expect.arrayContaining([
83+
{
84+
...expectedClickBreadcrumb,
85+
message: 'body > button.sentry-unmask[aria-label="Unmasked label"]',
86+
data: {
87+
nodeId: expect.any(Number),
88+
node: {
89+
attributes: {
90+
// TODO(rrweb): This is a bug in our rrweb fork!
91+
// This attribute should be unmasked.
92+
// 'aria-label': 'Unmasked label',
93+
'aria-label': '******** *****',
94+
class: 'sentry-unmask',
10095
},
96+
id: expect.any(Number),
97+
tagName: 'button',
98+
textContent: 'Unmasked',
10199
},
102100
},
103-
]),
104-
);
105-
},
106-
);
107-
}
101+
},
102+
]),
103+
);
104+
},
105+
);

0 commit comments

Comments
 (0)