-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11770 from getsentry/prepare-release/8.0.0-beta.4
- Loading branch information
Showing
196 changed files
with
3,846 additions
and
6,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...packages/browser-integration-tests/loader-suites/loader/noOnLoad/addBreadcrumb/subject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Sentry.addBreadcrumb({ | ||
category: 'auth', | ||
message: 'testing loader', | ||
level: 'error', | ||
}); | ||
Sentry.captureMessage('test'); |
22 changes: 22 additions & 0 deletions
22
dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/addBreadcrumb/test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers'; | ||
|
||
sentryTest('should add breadcrumb to message', async ({ getLocalTestUrl, page }) => { | ||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
const req = await waitForErrorRequestOnUrl(page, url); | ||
|
||
const eventData = envelopeRequestParser(req); | ||
|
||
expect(eventData.message).toBe('test'); | ||
expect(eventData.breadcrumbs?.length).toBe(1); | ||
expect(eventData.breadcrumbs).toEqual([ | ||
{ | ||
category: 'auth', | ||
level: 'error', | ||
message: 'testing loader', | ||
timestamp: expect.any(Number), | ||
}, | ||
]); | ||
}); |
8 changes: 8 additions & 0 deletions
8
dev-packages/browser-integration-tests/loader-suites/loader/onLoad/addBreadcrumb/init.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Sentry.onLoad(function () { | ||
Sentry.init({}); | ||
Sentry.addBreadcrumb({ | ||
category: 'auth', | ||
message: 'testing loader', | ||
level: 'error', | ||
}); | ||
}); |
1 change: 1 addition & 0 deletions
1
dev-packages/browser-integration-tests/loader-suites/loader/onLoad/addBreadcrumb/subject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Sentry.captureMessage('test'); |
22 changes: 22 additions & 0 deletions
22
dev-packages/browser-integration-tests/loader-suites/loader/onLoad/addBreadcrumb/test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { expect } from '@playwright/test'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers'; | ||
|
||
sentryTest('should add breadcrumb from onLoad callback to message', async ({ getLocalTestUrl, page }) => { | ||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
const req = await waitForErrorRequestOnUrl(page, url); | ||
|
||
const eventData = envelopeRequestParser(req); | ||
|
||
expect(eventData.message).toBe('test'); | ||
expect(eventData.breadcrumbs?.length).toBe(1); | ||
expect(eventData.breadcrumbs).toEqual([ | ||
{ | ||
category: 'auth', | ||
level: 'error', | ||
message: 'testing loader', | ||
timestamp: expect.any(Number), | ||
}, | ||
]); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...ckages/browser-integration-tests/suites/integrations/lazyLoad/validIntegrationNpm/init.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
// So we can use this in subject.js | ||
// We specifically DO NOT set this on window.Sentry as we want to test a non-CDN bundle environment, | ||
// where window.Sentry is usually not available | ||
window._testSentry = { ...Sentry }; | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
integrations: [], | ||
}); |
7 changes: 7 additions & 0 deletions
7
...ges/browser-integration-tests/suites/integrations/lazyLoad/validIntegrationNpm/subject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
window._testLazyLoadIntegration = async function run() { | ||
const integration = await window._testSentry.lazyLoadIntegration('httpClientIntegration'); | ||
|
||
window._testSentry.getClient()?.addIntegration(integration()); | ||
|
||
window._integrationLoaded = true; | ||
}; |
Oops, something went wrong.