-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathtest.ts
30 lines (24 loc) · 1016 Bytes
/
test.ts
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
27
28
29
30
import { expect } from '@playwright/test';
import { sentryTest } from '../../../../utils/fixtures';
sentryTest(
'should not add default integrations if integrations function is provided',
async ({ getLocalTestUrl, page }) => {
const url = await getLocalTestUrl({ testDir: __dirname });
await page.goto(url);
await page.waitForFunction(() => {
return (window as any).__sentryLoaded;
});
const hasCustomIntegration = await page.evaluate(() => {
return !!(window as any).Sentry.getClient().getIntegrationByName('CustomIntegration');
});
const hasReplay = await page.evaluate(() => {
return !!(window as any).Sentry.getClient().getIntegrationByName('Replay');
});
const hasBrowserTracing = await page.evaluate(() => {
return !!(window as any).Sentry.getClient().getIntegrationByName('BrowserTracing');
});
expect(hasCustomIntegration).toEqual(true);
expect(hasReplay).toEqual(false);
expect(hasBrowserTracing).toEqual(false);
},
);