From 57968857a5dacf7522313656eb063ba390d8f024 Mon Sep 17 00:00:00 2001 From: sibiraj-s Date: Thu, 27 May 2021 11:04:23 +0530 Subject: [PATCH] chore: remove e2e tests --- .eslintrc.json | 3 +-- angular.json | 12 --------- package.json | 1 - projects/demo/.eslintrc.json | 3 +-- projects/demo/e2e/protractor.conf.js | 37 --------------------------- projects/demo/e2e/src/app.e2e-spec.ts | 23 ----------------- projects/demo/e2e/src/app.po.ts | 11 -------- projects/demo/e2e/tsconfig.json | 13 ---------- 8 files changed, 2 insertions(+), 101 deletions(-) delete mode 100644 projects/demo/e2e/protractor.conf.js delete mode 100644 projects/demo/e2e/src/app.e2e-spec.ts delete mode 100644 projects/demo/e2e/src/app.po.ts delete mode 100644 projects/demo/e2e/tsconfig.json diff --git a/.eslintrc.json b/.eslintrc.json index fe249099..7ee35f5b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,8 +10,7 @@ ], "parserOptions": { "project": [ - "tsconfig.json", - "e2e/tsconfig.json" + "tsconfig.json" ], "createDefaultProgram": true }, diff --git a/angular.json b/angular.json index 24e42bf3..26ba251a 100644 --- a/angular.json +++ b/angular.json @@ -141,18 +141,6 @@ "projects/demo/**/*.html" ] } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "projects/demo/e2e/protractor.conf.js", - "devServerTarget": "demo:serve" - }, - "configurations": { - "production": { - "devServerTarget": "demo:serve:production" - } - } } } } diff --git a/package.json b/package.json index 9e2cf5ec..6eba5f00 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,6 @@ "demo": "ng serve demo --open --port 5002 --host 0.0.0.0", "docs": "docsify serve ./docs", "ng": "ng", - "e2e": "ng e2e", "lint": "ng lint", "format:md": "prettier **/*.md --write", "prerelease": "npm run build:lib", diff --git a/projects/demo/.eslintrc.json b/projects/demo/.eslintrc.json index e17b169d..dc94e4b5 100644 --- a/projects/demo/.eslintrc.json +++ b/projects/demo/.eslintrc.json @@ -11,8 +11,7 @@ "parserOptions": { "project": [ "projects/demo/tsconfig.app.json", - "projects/demo/tsconfig.spec.json", - "projects/demo/e2e/tsconfig.json" + "projects/demo/tsconfig.spec.json" ], "createDefaultProgram": true }, diff --git a/projects/demo/e2e/protractor.conf.js b/projects/demo/e2e/protractor.conf.js deleted file mode 100644 index 22bd9d95..00000000 --- a/projects/demo/e2e/protractor.conf.js +++ /dev/null @@ -1,37 +0,0 @@ -// @ts-check -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); - -/** - * @type { import("protractor").Config } - */ -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './src/**/*.e2e-spec.ts' - ], - capabilities: { - browserName: 'chrome' - }, - directConnect: true, - SELENIUM_PROMISE_MANAGER: false, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: require('path').join(__dirname, './tsconfig.json') - }); - jasmine.getEnv().addReporter(new SpecReporter({ - spec: { - displayStacktrace: StacktraceOption.PRETTY - } - })); - } -}; diff --git a/projects/demo/e2e/src/app.e2e-spec.ts b/projects/demo/e2e/src/app.e2e-spec.ts deleted file mode 100644 index fc392b77..00000000 --- a/projects/demo/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { AppPage } from './app.po'; -import { browser, logging } from 'protractor'; - -describe('ngx-editor App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display welcome message', async () => { - await page.navigateTo(); - expect(await page.getTitleText()).toEqual('Rich Text Editor for angular using ProseMirror'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/projects/demo/e2e/src/app.po.ts b/projects/demo/e2e/src/app.po.ts deleted file mode 100644 index e2d4d939..00000000 --- a/projects/demo/e2e/src/app.po.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, by, element } from 'protractor'; - -export class AppPage { - async navigateTo(): Promise { - return browser.get(browser.baseUrl); - } - - async getTitleText(): Promise { - return element(by.css('app-root .subtitle')).getText(); - } -} diff --git a/projects/demo/e2e/tsconfig.json b/projects/demo/e2e/tsconfig.json deleted file mode 100644 index dacd5c32..00000000 --- a/projects/demo/e2e/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "../../../tsconfig.json", - "compilerOptions": { - "outDir": "../../../out-tsc/e2e", - "module": "commonjs", - "target": "es2018", - "types": [ - "jasmine", - "node" - ] - } -}