Skip to content

Commit 4041365

Browse files
committed
test: fix failing update e2e tests
The HTML was not matching the expect correctly (cherry picked from commit 9d5e39d)
1 parent dc38326 commit 4041365

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/legacy-cli/e2e/assets/15.0-project/src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
</g>
342342
</svg>
343343

344-
<span>{{ title }} app is running!</span>
344+
<h1>Hello, {{ title }}</h1>
345345

346346
<svg id="rocket-smoke" xmlns="http://www.w3.org/2000/svg" width="516.119" height="1083.632" viewBox="0 0 516.119 1083.632">
347347
<title>Rocket Ship Smoke</title>

tests/legacy-cli/e2e/assets/15.0-project/src/app/app.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ describe('AppComponent', () => {
3030
const fixture = TestBed.createComponent(AppComponent);
3131
fixture.detectChanges();
3232
const compiled = fixture.nativeElement as HTMLElement;
33-
expect(compiled.querySelector('.content span')?.textContent).toContain('fifteen-project app is running!');
33+
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, fifteen-project');
3434
});
3535
});

tests/legacy-cli/e2e/tests/update/update.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ export default async function () {
5656
// Update Angular current build
5757
const extraUpdateArgs = isPrereleaseCli() ? ['--next', '--force'] : [];
5858

59-
// Generate e2e test prior to `ng update` as the asserted content changed in v17.
60-
await ng('generate', 'e2e', '--related-app-name=fifteen-project');
61-
6259
// For the latest/next release we purposely don't run `ng update @angular/core`.
6360

6461
// During a major release when the branch version is bumped from `12.0.0-rc.x` to `12.0.0` there would be a period were in
@@ -74,6 +71,9 @@ export default async function () {
7471

7572
await ng('update', '@angular/cli', ...extraUpdateArgs);
7673

74+
// Generate E2E setup
75+
await ng('generate', 'e2e', '--related-app-name=fifteen-project');
76+
7777
// Setup testing to use CI Chrome.
7878
await useCIChrome('fifteen-project', './');
7979
await useCIChrome('fifteen-project', './e2e/');

0 commit comments

Comments
 (0)