Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.

Commit

Permalink
fix(@schematics/angular): e2e should use the name
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cexbrayat authored and clydin committed May 29, 2018
1 parent ae22bcb commit 2f7d427
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ export default function (options: ApplicationOptions): Rule {
name: `${options.name}-e2e`,
relatedAppName: options.name,
rootSelector: appRootSelector,
prefix: options.prefix || 'app',
};
if (options.projectRoot !== undefined) {
e2eOptions.projectRoot = 'e2e';
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/e2e/files/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ describe('workspace-project App', () => {

it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to <%= prefix %>!');
expect(page.getParagraphText()).toEqual('Welcome to <%= relatedAppName %>!');
});
});
4 changes: 0 additions & 4 deletions packages/schematics/angular/e2e/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,4 @@ export interface Schema {
* The name of the app being tested.
*/
relatedAppName: string;
/**
* The prefix to apply.
*/
prefix?: string;
}
7 changes: 0 additions & 7 deletions packages/schematics/angular/e2e/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
"relatedAppName": {
"description": "The name of the app being tested.",
"type": "string"
},
"prefix": {
"type": "string",
"format": "html-selector",
"description": "The prefix to apply to generated selectors.",
"default": "app",
"alias": "p"
}
},
"required": [
Expand Down

0 comments on commit 2f7d427

Please sign in to comment.