From 2f7d427948b7831da6ed2c047f142c545db3c715 Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Thu, 17 May 2018 08:04:40 +0200 Subject: [PATCH] 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. --- packages/schematics/angular/application/index.ts | 1 - packages/schematics/angular/e2e/files/src/app.e2e-spec.ts | 2 +- packages/schematics/angular/e2e/schema.d.ts | 4 ---- packages/schematics/angular/e2e/schema.json | 7 ------- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts index 176cbbb2b1..80a71d0153 100644 --- a/packages/schematics/angular/application/index.ts +++ b/packages/schematics/angular/application/index.ts @@ -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'; diff --git a/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts b/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts index 142212d50d..d097198b3f 100644 --- a/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts +++ b/packages/schematics/angular/e2e/files/src/app.e2e-spec.ts @@ -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 %>!'); }); }); diff --git a/packages/schematics/angular/e2e/schema.d.ts b/packages/schematics/angular/e2e/schema.d.ts index 5d29ba12d4..2180f69412 100644 --- a/packages/schematics/angular/e2e/schema.d.ts +++ b/packages/schematics/angular/e2e/schema.d.ts @@ -23,8 +23,4 @@ export interface Schema { * The name of the app being tested. */ relatedAppName: string; - /** - * The prefix to apply. - */ - prefix?: string; } diff --git a/packages/schematics/angular/e2e/schema.json b/packages/schematics/angular/e2e/schema.json index 491d77d426..df166cf4a2 100644 --- a/packages/schematics/angular/e2e/schema.json +++ b/packages/schematics/angular/e2e/schema.json @@ -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": [