Skip to content

Commit a960cc0

Browse files
committed
fix(@schematics/angular): Fix handling of returned promises
Avoid floating promises Rationale: https://palantir.github.io/tslint/rules/no-floating-promises/
1 parent c35b541 commit a960cc0

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

integration/angular_cli/e2e/src/app.e2e-spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ describe('workspace-project App', () => {
88
page = new AppPage();
99
});
1010

11-
it('should display welcome message', () => {
12-
page.navigateTo();
13-
expect(page.getTitleText()).toEqual('integration-project app is running!');
11+
it('should display welcome message', async () => {
12+
await page.navigateTo();
13+
await expect(await page.getTitleText()).toEqual('integration-project app is running!');
1414
});
1515

1616
afterEach(async () => {

packages/angular_devkit/build_angular/test/hello-world-app/e2e/app.e2e-spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ describe('hello-world-app App', () => {
1414
page = new AppPage();
1515
});
1616

17-
it('should display welcome message', () => {
18-
page.navigateTo();
19-
expect(page.getTitleText()).toEqual('Welcome to app!');
17+
it('should display welcome message', async () => {
18+
await page.navigateTo();
19+
await expect(await page.getTitleText()).toEqual('Welcome to app!');
2020
});
2121
});

packages/schematics/angular/e2e/files/src/app.e2e-spec.ts.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ describe('workspace-project App', () => {
88
page = new AppPage();
99
});
1010

11-
it('should display welcome message', () => {
12-
page.navigateTo();
13-
expect(page.getTitleText()).toEqual('<%= relatedAppName %> app is running!');
11+
it('should display welcome message', async () => {
12+
await page.navigateTo();
13+
await expect(await page.getTitleText()).toEqual('<%= relatedAppName %> app is running!');
1414
});
1515

1616
afterEach(async () => {

0 commit comments

Comments
 (0)