Skip to content

Commit 04d32b6

Browse files
authored
chore: adds angular test app for v17 (#28513)
Issue number: Internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> There is no Angular v17 test app. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> There is an Angular v17 test app. New overrides: - angular.json: `browserTarget` was changed to `buildTarget` and to replace `@nguniversal` with `@angular/ssr` and `@angular-devkit/build-angular` - server.ts: Replace uses of `@nguniversal` with `@angular/ssr` New change to base: - polyfills.ts: Import [changed](https://github.com/angular/angular/blob/main/CHANGELOG.md#zonejs) from `import 'zone.js/dist/zone';` (this change is supported for all versions of Angular that we support, so should be changed in the base file) All other files were duplicated from their v16 counterparts. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent 3425119 commit 04d32b6

File tree

17 files changed

+16749
-3
lines changed

17 files changed

+16749
-3
lines changed

.github/workflows/actions/test-angular-e2e/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ runs:
88
steps:
99
- uses: actions/setup-node@v3
1010
with:
11-
node-version: 16
11+
node-version: 18
1212
- uses: ./.github/workflows/actions/download-archive
1313
with:
1414
name: ionic-core

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
strategy:
141141
fail-fast: false
142142
matrix:
143-
apps: [ng14, ng15, ng16]
143+
apps: [ng14, ng15, ng16, ng17]
144144
needs: [build-angular, build-angular-server]
145145
runs-on: ubuntu-latest
146146
steps:
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"test-app": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"prefix": "app",
11+
"schematics": {},
12+
"architect": {
13+
"build": {
14+
"builder": "@angular-devkit/build-angular:browser",
15+
"options": {
16+
"outputPath": "dist/test-app/browser",
17+
"index": "src/index.html",
18+
"main": "src/main.ts",
19+
"polyfills": "src/polyfills.ts",
20+
"tsConfig": "tsconfig.app.json",
21+
"buildOptimizer": true,
22+
"assets": [
23+
"src/favicon.ico",
24+
{
25+
"glob": "**/*",
26+
"input": "src/assets",
27+
"output": "assets"
28+
},
29+
{
30+
"glob": "**/*.svg",
31+
"input": "node_modules/ionicons/dist/ionicons/svg",
32+
"output": "./svg"
33+
}
34+
],
35+
"styles": ["src/styles.css"],
36+
"scripts": []
37+
},
38+
"configurations": {
39+
"production": {
40+
"fileReplacements": [
41+
{
42+
"replace": "src/environments/environment.ts",
43+
"with": "src/environments/environment.prod.ts"
44+
}
45+
],
46+
"optimization": true,
47+
"outputHashing": "all",
48+
"sourceMap": false,
49+
"namedChunks": false,
50+
"aot": true,
51+
"progress": false,
52+
"extractLicenses": true,
53+
"vendorChunk": false,
54+
"buildOptimizer": true,
55+
"budgets": [
56+
{
57+
"type": "initial",
58+
"maximumWarning": "2mb",
59+
"maximumError": "5mb"
60+
},
61+
{
62+
"type": "anyComponentStyle",
63+
"maximumWarning": "6kb"
64+
}
65+
]
66+
},
67+
"development": {
68+
"buildOptimizer": false,
69+
"optimization": false,
70+
"vendorChunk": true,
71+
"extractLicenses": false,
72+
"sourceMap": true,
73+
"namedChunks": true
74+
}
75+
},
76+
"defaultConfiguration": "production"
77+
},
78+
"serve": {
79+
"builder": "@angular-devkit/build-angular:dev-server",
80+
"options": {
81+
"buildTarget": "test-app:build"
82+
},
83+
"configurations": {
84+
"production": {
85+
"buildTarget": "test-app:build:production"
86+
},
87+
"development": {
88+
"buildTarget": "test-app:build:development"
89+
}
90+
},
91+
"defaultConfiguration": "development"
92+
},
93+
"extract-i18n": {
94+
"builder": "@angular-devkit/build-angular:extract-i18n",
95+
"options": {
96+
"buildTarget": "test-app:build"
97+
}
98+
},
99+
"lint": {
100+
"builder": "@angular-eslint/builder:lint",
101+
"options": {
102+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
103+
}
104+
},
105+
"server": {
106+
"builder": "@angular-devkit/build-angular:server",
107+
"options": {
108+
"outputPath": "dist/test-app/server",
109+
"main": "server.ts",
110+
"tsConfig": "tsconfig.server.json"
111+
},
112+
"configurations": {
113+
"production": {
114+
"outputHashing": "media",
115+
"fileReplacements": [
116+
{
117+
"replace": "src/environments/environment.ts",
118+
"with": "src/environments/environment.prod.ts"
119+
}
120+
],
121+
"sourceMap": false,
122+
"optimization": true
123+
}
124+
}
125+
},
126+
"serve-ssr": {
127+
"builder": "@angular-devkit/build-angular:ssr-dev-server",
128+
"options": {
129+
"browserTarget": "test-app:build",
130+
"serverTarget": "test-app:server"
131+
},
132+
"configurations": {
133+
"production": {
134+
"browserTarget": "test-app:build:production",
135+
"serverTarget": "test-app:server:production"
136+
}
137+
}
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+
}
146+
}
147+
}
148+
}
149+
},
150+
"cli": {
151+
"schematicCollections": ["@angular-eslint/schematics"],
152+
"cache": {
153+
"enabled": false
154+
}
155+
}
156+
}

packages/angular/test/apps/ng17/e2e/src/.gitkeep

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
it("should be on Angular 17", () => {
2+
cy.visit('/lazy');
3+
4+
cy.get('ion-title').contains('Angular 17');
5+
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
it("binding route data to inputs should work", () => {
2+
cy.visit('/lazy/version-test/bind-route/test?query=test');
3+
4+
cy.get('#route-params').contains('test');
5+
cy.get('#query-params').contains('test');
6+
cy.get('#data').contains('data:bindToComponentInputs');
7+
cy.get('#resolve').contains('resolve:bindToComponentInputs');
8+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
describe('Modal Nav Params', () => {
2+
3+
beforeEach(() => {
4+
cy.visit('/lazy/version-test/modal-nav-params');
5+
});
6+
7+
it('should assign the rootParams when presented in a modal multiple times', () => {
8+
cy.contains('Open Modal').click();
9+
cy.get('ion-modal').should('exist').should('be.visible');
10+
cy.get('ion-modal').contains('OK');
11+
12+
cy.contains("Close").click();
13+
cy.get('ion-modal').should('not.be.visible');
14+
15+
cy.contains('Open Modal').click();
16+
cy.get('ion-modal').should('exist').should('be.visible');
17+
cy.get('ion-modal').contains('OK').should('exist');
18+
});
19+
20+
});

0 commit comments

Comments
 (0)