-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtest.ts
More file actions
19 lines (14 loc) · 604 Bytes
/
test.ts
File metadata and controls
19 lines (14 loc) · 604 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { expect } from '@playwright/test';
import { sentryTest } from '../../../../utils/fixtures';
import { getReplayEvent, shouldSkipReplayTest, waitForReplayRequest } from '../../../../utils/replayHelpers';
sentryTest('should capture a replay', 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);
});