-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtest.ts
More file actions
15 lines (11 loc) · 641 Bytes
/
test.ts
File metadata and controls
15 lines (11 loc) · 641 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { expect } from '@playwright/test';
import { sentryTest } from '../../../../utils/fixtures';
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
sentryTest('keeps data on window.Sentry intact', async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });
const req = await waitForErrorRequestOnUrl(page, url);
const eventData = envelopeRequestParser(req);
expect(eventData.message).toBe('Test exception');
const customThingy = await page.evaluate('window.Sentry._customThingOnSentry');
expect(customThingy).toBe('customThingOnSentry');
});