Skip to content

Commit 0e2529a

Browse files
committed
test(angular): Add Angular 20.0.0-rc.2 e2e test
1 parent 61940fc commit 0e2529a

26 files changed

+862
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
ij_typescript_use_double_quotes = false
14+
15+
[*.md]
16+
max_line_length = off
17+
trim_trailing_whitespace = false
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db
43+
44+
test-results
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@sentry:registry=http://127.0.0.1:4873
2+
@sentry-internal:registry=http://127.0.0.1:4873
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Angular 20
2+
3+
E2E test app for Angular 20 and `@sentry/angular`.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"angular-20": {
7+
"projectType": "application",
8+
"schematics": {},
9+
"root": "",
10+
"sourceRoot": "src",
11+
"prefix": "app",
12+
"architect": {
13+
"build": {
14+
"builder": "@angular-devkit/build-angular:application",
15+
"options": {
16+
"outputPath": "dist/angular-20",
17+
"index": "src/index.html",
18+
"browser": "src/main.ts",
19+
"polyfills": ["zone.js"],
20+
"tsConfig": "tsconfig.app.json",
21+
"assets": [
22+
{
23+
"glob": "**/*",
24+
"input": "public"
25+
}
26+
],
27+
"styles": ["src/styles.css"],
28+
"scripts": []
29+
},
30+
"configurations": {
31+
"production": {
32+
"budgets": [
33+
{
34+
"type": "initial",
35+
"maximumWarning": "500kB",
36+
"maximumError": "1MB"
37+
},
38+
{
39+
"type": "anyComponentStyle",
40+
"maximumWarning": "4kB",
41+
"maximumError": "8kB"
42+
}
43+
],
44+
"outputHashing": "all"
45+
},
46+
"development": {
47+
"optimization": false,
48+
"extractLicenses": false,
49+
"sourceMap": true
50+
}
51+
},
52+
"defaultConfiguration": "production"
53+
},
54+
"serve": {
55+
"builder": "@angular-devkit/build-angular:dev-server",
56+
"configurations": {
57+
"production": {
58+
"buildTarget": "angular-20:build:production"
59+
},
60+
"development": {
61+
"buildTarget": "angular-20:build:development"
62+
}
63+
},
64+
"defaultConfiguration": "development"
65+
},
66+
"extract-i18n": {
67+
"builder": "@angular-devkit/build-angular:extract-i18n"
68+
},
69+
"test": {
70+
"builder": "@angular-devkit/build-angular:karma",
71+
"options": {
72+
"polyfills": ["zone.js", "zone.js/testing"],
73+
"tsConfig": "tsconfig.spec.json",
74+
"assets": [
75+
{
76+
"glob": "**/*",
77+
"input": "public"
78+
}
79+
],
80+
"styles": ["src/styles.css"],
81+
"scripts": []
82+
}
83+
}
84+
}
85+
}
86+
}
87+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "angular-20",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"ng": "ng",
6+
"dev": "ng serve",
7+
"proxy": "node start-event-proxy.mjs",
8+
"preview": "http-server dist/angular-20/browser --port 8080",
9+
"build": "ng build",
10+
"watch": "ng build --watch --configuration development",
11+
"test": "playwright test",
12+
"test:build": "pnpm install && pnpm build",
13+
"test:assert": "playwright test",
14+
"clean": "npx rimraf .angular node_modules pnpm-lock.yaml dist"
15+
},
16+
"private": true,
17+
"dependencies": {
18+
"@angular/animations": "^20.0.0-rc.2",
19+
"@angular/common": "^20.0.0-rc.2",
20+
"@angular/compiler": "^20.0.0-rc.2",
21+
"@angular/core": "^20.0.0-rc.2",
22+
"@angular/forms": "^20.0.0-rc.2",
23+
"@angular/platform-browser": "^20.0.0-rc.2",
24+
"@angular/platform-browser-dynamic": "^20.0.0-rc.2",
25+
"@angular/router": "^20.0.0-rc.2",
26+
"@sentry/angular": "* || latest",
27+
"rxjs": "~7.8.0",
28+
"tslib": "^2.3.0",
29+
"zone.js": "~0.15.0"
30+
},
31+
"devDependencies": {
32+
"@angular-devkit/build-angular": "^20.0.0-rc.2",
33+
"@angular/cli": "^20.0.0-rc.2",
34+
"@angular/compiler-cli": "^20.0.0-rc.2",
35+
"@playwright/test": "~1.50.0",
36+
"@sentry-internal/test-utils": "link:../../../test-utils",
37+
"@types/jasmine": "~5.1.0",
38+
"http-server": "^14.1.1",
39+
"jasmine-core": "~5.4.0",
40+
"karma": "~6.4.0",
41+
"karma-chrome-launcher": "~3.2.0",
42+
"karma-coverage": "~2.2.0",
43+
"karma-jasmine": "~5.1.0",
44+
"karma-jasmine-html-reporter": "~2.1.0",
45+
"typescript": "~5.8.3"
46+
}
47+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { getPlaywrightConfig } from '@sentry-internal/test-utils';
2+
3+
const config = getPlaywrightConfig({
4+
startCommand: `pnpm preview`,
5+
port: 8080,
6+
});
7+
8+
export default config;
Binary file not shown.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { Component } from '@angular/core';
2+
import { RouterOutlet } from '@angular/router';
3+
4+
@Component({
5+
selector: 'app-root',
6+
standalone: true,
7+
imports: [RouterOutlet],
8+
template: `<router-outlet></router-outlet>`,
9+
})
10+
export class AppComponent {
11+
title = 'angular-20';
12+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import {
2+
ApplicationConfig,
3+
ErrorHandler,
4+
inject,
5+
provideAppInitializer,
6+
provideZoneChangeDetection,
7+
} from '@angular/core';
8+
import { Router, provideRouter } from '@angular/router';
9+
10+
import { TraceService, createErrorHandler } from '@sentry/angular';
11+
import { routes } from './app.routes';
12+
13+
export const appConfig: ApplicationConfig = {
14+
providers: [
15+
provideZoneChangeDetection({ eventCoalescing: true }),
16+
provideRouter(routes),
17+
{
18+
provide: ErrorHandler,
19+
useValue: createErrorHandler(),
20+
},
21+
{
22+
provide: TraceService,
23+
deps: [Router],
24+
},
25+
provideAppInitializer(() => {
26+
inject(TraceService);
27+
}),
28+
],
29+
};

0 commit comments

Comments
 (0)