-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 #13249 from getsentry/prepare-release/8.24.0
- Loading branch information
Showing
35 changed files
with
410 additions
and
319 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: "Install Playwright dependencies" | ||
description: "Installs Playwright dependencies and caches them." | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Get Playwright version | ||
id: playwright-version | ||
run: echo "version=$(node -p "require('@playwright/test/package.json').version")" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- name: Cache playwright binaries | ||
uses: actions/cache@v4 | ||
id: playwright-cache | ||
with: | ||
path: | | ||
~/.cache/ms-playwright | ||
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} | ||
|
||
- name: Install Playwright dependencies (uncached) | ||
run: npx playwright install chromium webkit firefox --with-deps | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
shell: bash | ||
|
||
- name: Install Playwright system dependencies only (cached) | ||
run: npx playwright install-deps chromium webkit firefox | ||
if: steps.playwright-cache.outputs.cache-hit == 'true' | ||
shell: bash |
Large diffs are not rendered by default.
Oops, something went wrong.
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
10 changes: 10 additions & 0 deletions
10
...ckages/browser-integration-tests/suites/integrations/lazyLoad/feedbackIntegration/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,10 @@ | ||
import * as Sentry from '@sentry/browser'; | ||
|
||
Sentry.init({ | ||
dsn: 'https://public@dsn.ingest.sentry.io/1337', | ||
integrations: [], | ||
}); | ||
|
||
window.Sentry = { | ||
...Sentry, | ||
}; |
7 changes: 7 additions & 0 deletions
7
...ges/browser-integration-tests/suites/integrations/lazyLoad/feedbackIntegration/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.Sentry.lazyLoadIntegration('feedbackIntegration'); | ||
|
||
window.Sentry.getClient()?.addIntegration(integration()); | ||
|
||
window._integrationLoaded = true; | ||
}; |
38 changes: 38 additions & 0 deletions
38
...ckages/browser-integration-tests/suites/integrations/lazyLoad/feedbackIntegration/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,38 @@ | ||
import { expect } from '@playwright/test'; | ||
import { SDK_VERSION } from '@sentry/browser'; | ||
|
||
import { sentryTest } from '../../../../utils/fixtures'; | ||
|
||
sentryTest('it allows to lazy load the feedback integration', async ({ getLocalTestUrl, page }) => { | ||
const bundle = process.env.PW_BUNDLE || ''; | ||
const url = await getLocalTestUrl({ testDir: __dirname }); | ||
|
||
await page.route(`https://browser.sentry-cdn.com/${SDK_VERSION}/feedback.min.js`, route => { | ||
return route.fulfill({ | ||
status: 200, | ||
contentType: 'application/javascript;', | ||
body: "window.Sentry.feedbackIntegration = () => ({ name: 'Feedback', attachTo: () => {} })", | ||
}); | ||
}); | ||
|
||
await page.goto(url); | ||
|
||
await page.waitForFunction('window.Sentry?.getClient()'); | ||
|
||
const integrationOutput1 = await page.evaluate('window.Sentry.feedbackIntegration?._isShim'); | ||
|
||
// Multiple cases are possible here: | ||
// 1. Bundle without feedback, should have _isShim property | ||
if (bundle.startsWith('bundle') && !bundle.includes('feedback')) { | ||
expect(integrationOutput1).toBe(true); | ||
} else { | ||
// 2. Either bundle with feedback, or ESM, should not have _isShim property | ||
expect(integrationOutput1).toBe(undefined); | ||
} | ||
|
||
await page.evaluate('window._testLazyLoadIntegration()'); | ||
await page.waitForFunction('window._integrationLoaded'); | ||
|
||
const integrationOutput2 = await page.evaluate('window.Sentry.feedbackIntegration?._isShim'); | ||
expect(integrationOutput2).toBe(undefined); | ||
}); |
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
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
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
Oops, something went wrong.