-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtest.ts
More file actions
22 lines (15 loc) · 724 Bytes
/
test.ts
File metadata and controls
22 lines (15 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { expect } from '@playwright/test';
import { sentryTest } from '../../../../utils/fixtures';
import { shouldSkipTracingTest } from '../../../../utils/helpers';
sentryTest("instrumentation doesn't override manually added sentry headers", 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');
});