Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit 2f7d427

Browse files
cexbrayatclydin
authored andcommitted
fix(@schematics/angular): e2e should use the name
PR #906 updated the app schematics to display the name of the app in the title, so the e2e test has to be fixed. The prefix is now useless (it was introduced by #720 to fix the e2e test when it was using prefix), and has been removed.
1 parent ae22bcb commit 2f7d427

File tree

4 files changed

+1
-13
lines changed

4 files changed

+1
-13
lines changed

packages/schematics/angular/application/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ export default function (options: ApplicationOptions): Rule {
275275
name: `${options.name}-e2e`,
276276
relatedAppName: options.name,
277277
rootSelector: appRootSelector,
278-
prefix: options.prefix || 'app',
279278
};
280279
if (options.projectRoot !== undefined) {
281280
e2eOptions.projectRoot = 'e2e';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ describe('workspace-project App', () => {
99

1010
it('should display welcome message', () => {
1111
page.navigateTo();
12-
expect(page.getParagraphText()).toEqual('Welcome to <%= prefix %>!');
12+
expect(page.getParagraphText()).toEqual('Welcome to <%= relatedAppName %>!');
1313
});
1414
});

packages/schematics/angular/e2e/schema.d.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,4 @@ export interface Schema {
2323
* The name of the app being tested.
2424
*/
2525
relatedAppName: string;
26-
/**
27-
* The prefix to apply.
28-
*/
29-
prefix?: string;
3026
}

packages/schematics/angular/e2e/schema.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@
2626
"relatedAppName": {
2727
"description": "The name of the app being tested.",
2828
"type": "string"
29-
},
30-
"prefix": {
31-
"type": "string",
32-
"format": "html-selector",
33-
"description": "The prefix to apply to generated selectors.",
34-
"default": "app",
35-
"alias": "p"
3629
}
3730
},
3831
"required": [

0 commit comments

Comments
 (0)