-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtest.ts
More file actions
26 lines (19 loc) · 869 Bytes
/
test.ts
File metadata and controls
26 lines (19 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { expect } from '@playwright/test';
import { sentryTest } from '../../../../utils/fixtures';
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';
sentryTest('should handle custom added Replay integration', async ({ getLocalTestUrl, page }) => {
if (shouldSkipReplayTest()) {
sentryTest.skip();
}
const req = waitForReplayRequest(page);
const url = await getLocalTestUrl({ testDir: __dirname });
await page.goto(url);
const eventData = getReplayEvent(await req);
expect(eventData).toBeDefined();
expect(eventData.segment_id).toBe(0);
const useCompression = await page.evaluate(() => {
const replay = (window as any).Sentry.getClient().getIntegrationByName('Replay');
return replay._replay.getOptions().useCompression;
});
expect(useCompression).toEqual(false);
});