|
1 | 1 | import { expect } from '@playwright/test';
|
2 |
| -import { SDK_VERSION } from '@sentry/browser'; |
3 | 2 |
|
4 | 3 | import { sentryTest } from '../../../utils/fixtures';
|
5 |
| -import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../utils/replayHelpers'; |
| 4 | +import { shouldSkipReplayTest } from '../../../utils/replayHelpers'; |
6 | 5 |
|
7 |
| -sentryTest('exceptions within rrweb and re-thrown and annotated', async ({ getLocalTestPath, page, browserName}) => { |
| 6 | +sentryTest('exceptions within rrweb and re-thrown and annotated', async ({ getLocalTestPath, page, browserName }) => { |
8 | 7 | if (shouldSkipReplayTest() || browserName !== 'chromium') {
|
9 | 8 | sentryTest.skip();
|
10 | 9 | }
|
11 | 10 |
|
12 |
| - // const reqPromise0 = waitForReplayRequest(page, 0); |
13 |
| - // const reqPromise1 = waitForReplayRequest(page, 1); |
14 |
| - // |
15 |
| - // await page.route('https://dsn.ingest.sentry.io/**/*', route => { |
16 |
| - // return route.fulfill({ |
17 |
| - // status: 200, |
18 |
| - // contentType: 'application/json', |
19 |
| - // body: JSON.stringify({ id: 'test-id' }), |
20 |
| - // }); |
21 |
| - // }); |
22 |
| - // |
23 | 11 | const url = await getLocalTestPath({ testDir: __dirname });
|
24 | 12 |
|
25 | 13 | await page.goto(url);
|
26 | 14 |
|
27 |
| -expect(await page.evaluate(() => { |
28 |
| - try { |
29 |
| - const s = new CSSStyleSheet(); |
30 |
| - s.insertRule('body::-ms-expand{display: none}'); |
31 |
| - s.insertRule('body {background-color: #fff;}'); |
32 |
| - return s.cssRules.length; |
33 |
| - } catch { |
34 |
| - return false; |
35 |
| - } |
36 |
| - })).toBe(false); |
| 15 | + expect( |
| 16 | + await page.evaluate(() => { |
| 17 | + try { |
| 18 | + const s = new CSSStyleSheet(); |
| 19 | + s.insertRule('body::-ms-expand{display: none}'); |
| 20 | + s.insertRule('body {background-color: #fff;}'); |
| 21 | + return s.cssRules.length; |
| 22 | + } catch { |
| 23 | + return false; |
| 24 | + } |
| 25 | + }), |
| 26 | + ).toBe(false); |
37 | 27 |
|
38 |
| -expect(await page.evaluate(() => { |
39 |
| - const s = new CSSStyleSheet(); |
40 |
| - s.insertRule('body {background-color: #fff;}'); |
41 |
| - return s.cssRules.length; |
42 |
| - })).toBe(1); |
43 |
| -}) |
| 28 | + expect( |
| 29 | + await page.evaluate(() => { |
| 30 | + const s = new CSSStyleSheet(); |
| 31 | + s.insertRule('body {background-color: #fff;}'); |
| 32 | + return s.cssRules.length; |
| 33 | + }), |
| 34 | + ).toBe(1); |
| 35 | +}); |
0 commit comments