-
-
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) · 847 Bytes
/
test.ts
File metadata and controls
26 lines (19 loc) · 847 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 { shouldSkipTracingTest } from '../../../../utils/helpers';
sentryTest(
"instrumentation doesn't override manually added traceparent header, if `propagateTraceparent` is true",
async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}
const requestPromise = page.waitForRequest('http://sentry-test-site.example/api/test/');
const url = await getLocalTestUrl({ testDir: __dirname });
await page.goto(url);
const request = await requestPromise;
const headers = await request.allHeaders();
expect(headers['sentry-trace']).toBe('abc-123-1');
expect(headers.baggage).toBe('sentry-trace_id=abc');
expect(headers.traceparent).toBe('00-abc-123-01');
},
);