Skip to content

Commit 9694e16

Browse files
committed
test(angular): update playwright config, browserslist and test script
1 parent f55e7a9 commit 9694e16

File tree

11 files changed

+98
-22
lines changed

11 files changed

+98
-22
lines changed

packages/angular/test/apps/ng16/angular.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,23 @@
7171
"extractLicenses": false,
7272
"sourceMap": true,
7373
"namedChunks": true
74+
},
75+
"test": {
76+
"fileReplacements": [
77+
{
78+
"replace": "src/environments/environment.ts",
79+
"with": "src/environments/environment.prod.ts"
80+
}
81+
],
82+
"optimization": true,
83+
"outputHashing": "none",
84+
"sourceMap": false,
85+
"namedChunks": false,
86+
"aot": true,
87+
"progress": false,
88+
"extractLicenses": false,
89+
"vendorChunk": false,
90+
"buildOptimizer": true
7491
}
7592
},
7693
"defaultConfiguration": "production"
@@ -86,6 +103,9 @@
86103
},
87104
"development": {
88105
"browserTarget": "test-app:build:development"
106+
},
107+
"test": {
108+
"browserTarget": "test-app:build:test"
89109
}
90110
},
91111
"defaultConfiguration": "development"

packages/angular/test/apps/ng16/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"build:ssr": "ng build --prod && ng run test-app:server:production",
1414
"dev:ssr": "ng run test-app:serve-ssr",
1515
"prerender": "ng run test-app:prerender",
16-
"test": "concurrently \"npm run start -- --configuration production\" \"wait-on http-get://localhost:4200 && npm run test.e2e\" --kill-others --success first",
17-
"test.e2e": "npx playwright test"
16+
"test": "npx playwright test"
1817
},
1918
"dependencies": {
2019
"@angular/animations": "^16.0.0",

packages/angular/test/apps/ng17/angular.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,23 @@
7171
"extractLicenses": false,
7272
"sourceMap": true,
7373
"namedChunks": true
74+
},
75+
"test": {
76+
"fileReplacements": [
77+
{
78+
"replace": "src/environments/environment.ts",
79+
"with": "src/environments/environment.prod.ts"
80+
}
81+
],
82+
"optimization": true,
83+
"outputHashing": "none",
84+
"sourceMap": false,
85+
"namedChunks": false,
86+
"aot": true,
87+
"progress": false,
88+
"extractLicenses": false,
89+
"vendorChunk": false,
90+
"buildOptimizer": true
7491
}
7592
},
7693
"defaultConfiguration": "production"
@@ -86,6 +103,9 @@
86103
},
87104
"development": {
88105
"buildTarget": "test-app:build:development"
106+
},
107+
"test": {
108+
"buildTarget": "test-app:build:test"
89109
}
90110
},
91111
"defaultConfiguration": "development"

packages/angular/test/apps/ng17/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"build:ssr": "ng build --prod && ng run test-app:server:production",
1414
"dev:ssr": "ng run test-app:serve-ssr",
1515
"prerender": "ng run test-app:prerender",
16-
"test": "concurrently \"npm run start -- --configuration production\" \"wait-on http-get://localhost:4200 && npm run test.e2e\" --kill-others --success first",
17-
"test.e2e": "npx playwright test"
16+
"test": "npx playwright test"
1817
},
1918
"dependencies": {
2019
"@angular/animations": "^17.0.2",

packages/angular/test/apps/ng18/angular.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,23 @@
7171
"extractLicenses": false,
7272
"sourceMap": true,
7373
"namedChunks": true
74+
},
75+
"test": {
76+
"fileReplacements": [
77+
{
78+
"replace": "src/environments/environment.ts",
79+
"with": "src/environments/environment.prod.ts"
80+
}
81+
],
82+
"optimization": true,
83+
"outputHashing": "none",
84+
"sourceMap": false,
85+
"namedChunks": false,
86+
"aot": true,
87+
"progress": false,
88+
"extractLicenses": false,
89+
"vendorChunk": false,
90+
"buildOptimizer": true
7491
}
7592
},
7693
"defaultConfiguration": "production"
@@ -86,6 +103,9 @@
86103
},
87104
"development": {
88105
"buildTarget": "test-app:build:development"
106+
},
107+
"test": {
108+
"buildTarget": "test-app:build:test"
89109
}
90110
},
91111
"defaultConfiguration": "development"

packages/angular/test/apps/ng18/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"build:ssr": "ng build --prod && ng run test-app:server:production",
1414
"dev:ssr": "ng run test-app:serve-ssr",
1515
"prerender": "ng run test-app:prerender",
16-
"test": "concurrently \"npm run start -- --configuration production\" \"wait-on http-get://localhost:4200 && npm run test.e2e\" --kill-others --success first",
17-
"test.e2e": "npx playwright test"
16+
"test": "npx playwright test"
1817
},
1918
"dependencies": {
2019
"@angular/animations": "^18.0.0",

packages/angular/test/apps/ng19/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"build:ssr": "ng build --prod && ng run test-app:server:production",
1414
"dev:ssr": "ng run test-app:serve-ssr",
1515
"prerender": "ng run test-app:prerender",
16-
"test": "concurrently \"npm run start -- --configuration production\" \"wait-on http-get://localhost:4200 && npm run test.e2e\" --kill-others --success first",
17-
"test.e2e": "npx playwright test"
16+
"test": "npx playwright test"
1817
},
1918
"dependencies": {
2019
"@angular/animations": "^19.0.0",

packages/angular/test/apps/ng20/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"build:ssr": "ng build --prod && ng run test-app:server:production",
1414
"dev:ssr": "ng run test-app:serve-ssr",
1515
"prerender": "ng run test-app:prerender",
16-
"test": "concurrently \"npm run start -- --configuration production\" \"wait-on http-get://localhost:4200 && npm run test.e2e\" --kill-others --success first",
17-
"test.e2e": "npx playwright test"
16+
"test": "npx playwright test"
1817
},
1918
"dependencies": {
2019
"@angular/animations": "^20.0.0",

packages/angular/test/base/.browserslistrc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
# You can see what browsers were selected by your queries by running:
66
# npx browserslist
77

8-
> 0.5%
9-
last 2 versions
10-
Firefox ESR
8+
# Compatible with Angular 16-20 - Main browsers only
9+
chrome >= 120
10+
firefox >= 115
11+
safari >= 17
12+
edge >= 120
13+
ios_saf >= 17
1114
not dead
1215
not IE 9-11 # For IE 9-11 support, remove 'not'.

packages/angular/test/base/angular.json

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,23 @@
7171
"extractLicenses": false,
7272
"sourceMap": true,
7373
"namedChunks": true
74+
},
75+
"test": {
76+
"fileReplacements": [
77+
{
78+
"replace": "src/environments/environment.ts",
79+
"with": "src/environments/environment.prod.ts"
80+
}
81+
],
82+
"optimization": true,
83+
"outputHashing": "none",
84+
"sourceMap": false,
85+
"namedChunks": false,
86+
"aot": true,
87+
"progress": false,
88+
"extractLicenses": false,
89+
"vendorChunk": false,
90+
"buildOptimizer": true
7491
}
7592
},
7693
"defaultConfiguration": "production"
@@ -86,6 +103,9 @@
86103
},
87104
"development": {
88105
"buildTarget": "test-app:build:development"
106+
},
107+
"test": {
108+
"buildTarget": "test-app:build:test"
89109
}
90110
},
91111
"defaultConfiguration": "development"
@@ -128,21 +148,19 @@
128148
"options": {
129149
"browserTarget": "test-app:build",
130150
"serverTarget": "test-app:server"
151+
}
152+
},
153+
"prerender": {
154+
"builder": "@angular-devkit/build-angular:prerender",
155+
"options": {
156+
"routesFile": "src/app/app.routes.ts"
131157
},
132158
"configurations": {
133159
"production": {
134160
"browserTarget": "test-app:build:production",
135161
"serverTarget": "test-app:server:production"
136162
}
137163
}
138-
},
139-
"prerender": {
140-
"builder": "@angular-devkit/build-angular:prerender",
141-
"options": {
142-
"browserTarget": "test-app:build:production",
143-
"serverTarget": "test-app:server:production",
144-
"routes": []
145-
}
146164
}
147165
}
148166
}

0 commit comments

Comments
 (0)