Skip to content

Commit dcab04e

Browse files
authored
Merge pull request #7218 from getsentry/develop
[Gitflow] Merge develop into master
2 parents b290fca + 82db382 commit dcab04e

33 files changed

+2183
-8
lines changed

.github/workflows/auto-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
env:
3434
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
3535
with:
36-
version: ${{ steps.version.outputs.match != '' }}
36+
version: ${{ steps.version.outputs.group1 }}
3737
force: false
3838
merge_target: master

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,14 @@ jobs:
298298
path: ${{ env.CACHED_BUILD_PATHS }}
299299
key: ${{ env.BUILD_CACHE_KEY }}
300300
- name: Check bundle sizes
301-
uses: getsentry/size-limit-action@main-skip-step
301+
uses: getsentry/size-limit-action@runForBranch
302302
with:
303303
github_token: ${{ secrets.GITHUB_TOKEN }}
304304
skip_step: build
305305
main_branch: develop
306+
# When on release branch, we want to always run
307+
# Else, we fall back to the default handling of the action
308+
run_for_branch: ${{ (needs.job_get_metadata.outputs.is_release == 'true' && 'true') || '' }}
306309

307310
job_lint:
308311
name: Lint

packages/integration-tests/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Each case group has a default HTML skeleton named `template.hbs`, and also a def
1212

1313
`test.ts` is required for each test case, which contains the assertions (and if required the script injection logic). For every case, any set of `init.js`, `template.hbs` and `subject.js` can be defined locally, and each one of them will have precedence over the default definitions of the test group.
1414

15+
To test page multi-page navigations, you can specify additional `page-*.html` (e.g. `page-0.html`, `page-1.html`) files. These will also be compiled and initialized with the same `init.js` and `subject.js` files that are applied to `template.hbs/html`. Note: `page-*.html` file lookup **doesn not** fall back to the
16+
parent directories, meaning that page files have to be directly in the `test.ts` directory.
17+
1518
```
1619
suites/
1720
|---- breadcrumbs/
@@ -23,6 +26,7 @@ suites/
2326
|---- init.js [optional case specific init]
2427
|---- subject.js [optional case specific subject]
2528
|---- test.ts [assertions]
29+
|---- page-*.html [optional, NO fallback!]
2630
```
2731

2832
## Writing Tests
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as Sentry from '@sentry/browser';
2+
3+
window.Sentry = Sentry;
4+
window.Replay = new Sentry.Replay({
5+
flushMinDelay: 500,
6+
flushMaxDelay: 500,
7+
});
8+
9+
Sentry.init({
10+
dsn: 'https://[email protected]/1337',
11+
sampleRate: 0,
12+
replaysSessionSampleRate: 1.0,
13+
replaysOnErrorSampleRate: 0,
14+
15+
integrations: [window.Replay],
16+
});
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
</head>
6+
<body>
7+
<h1>Secondary Page</h1>
8+
<button id="go-background">New Tab</button>
9+
<button id="spa-navigation">Mimic a SPA navigation</button>
10+
<!-- Template.html becomes index.html during test execution-->
11+
<a href="./index.html">Go Back to first page</a>
12+
</body>
13+
</html>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
document.getElementById('go-background').addEventListener('click', () => {
2+
Object.defineProperty(document, 'hidden', { value: true, writable: true });
3+
const ev = document.createEvent('Event');
4+
ev.initEvent('visibilitychange');
5+
document.dispatchEvent(ev);
6+
});
7+
8+
document.getElementById('spa-navigation').addEventListener('click', () => {
9+
window.history.pushState({}, '', '/spa');
10+
});
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
</head>
6+
<body>
7+
<button id="go-background">New Tab</button>
8+
<a href="./page-0.html">Go To new page</a>
9+
</body>
10+
</html>

0 commit comments

Comments
 (0)