From 29767eed33cc1f33ec3d69344279d733e8843ed6 Mon Sep 17 00:00:00 2001 From: Max Burri Date: Fri, 10 Nov 2023 11:13:44 +0100 Subject: [PATCH] remove e2e tests from AMW_angular/io --- AMW_angular/io/README.md | 2 +- AMW_angular/io/angular.json | 12 ---------- AMW_angular/io/e2e/protractor.conf.js | 32 ------------------------- AMW_angular/io/e2e/src/app/app.e2e.ts | 34 --------------------------- AMW_angular/io/e2e/tsconfig.json | 13 ---------- AMW_angular/io/package.json | 2 -- AMW_e2e/package-lock.json | 8 ++----- 7 files changed, 3 insertions(+), 100 deletions(-) delete mode 100644 AMW_angular/io/e2e/protractor.conf.js delete mode 100644 AMW_angular/io/e2e/src/app/app.e2e.ts delete mode 100644 AMW_angular/io/e2e/tsconfig.json diff --git a/AMW_angular/io/README.md b/AMW_angular/io/README.md index d9b306c7e..608b9f6cf 100644 --- a/AMW_angular/io/README.md +++ b/AMW_angular/io/README.md @@ -35,7 +35,7 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github. ## Running end-to-end tests -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). +See `AMW_e2e` for end-to-end tests ## Further help diff --git a/AMW_angular/io/angular.json b/AMW_angular/io/angular.json index 8048a4b86..64a991ad4 100644 --- a/AMW_angular/io/angular.json +++ b/AMW_angular/io/angular.json @@ -109,18 +109,6 @@ "src/styles.scss" ] } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "liima:serve" - }, - "configurations": { - "production": { - "devServerTarget": "liima:serve:production" - } - } } } } diff --git a/AMW_angular/io/e2e/protractor.conf.js b/AMW_angular/io/e2e/protractor.conf.js deleted file mode 100644 index 73e4e6806..000000000 --- a/AMW_angular/io/e2e/protractor.conf.js +++ /dev/null @@ -1,32 +0,0 @@ -// @ts-check -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter } = require('jasmine-spec-reporter'); - -/** - * @type { import("protractor").Config } - */ -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './src/**/*.e2e-spec.ts' - ], - capabilities: { - 'browserName': 'chrome' - }, - directConnect: true, - 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: true } })); - } -}; \ No newline at end of file diff --git a/AMW_angular/io/e2e/src/app/app.e2e.ts b/AMW_angular/io/e2e/src/app/app.e2e.ts deleted file mode 100644 index 8636c128e..000000000 --- a/AMW_angular/io/e2e/src/app/app.e2e.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { browser, by, element } from 'protractor'; - -describe('App', () => { - - beforeEach(() => { - browser.get('/'); - }); - - - it('should have a title', () => { - let subject = browser.getTitle(); - let result = 'Angular2 Webpack Starter by @gdi2290 from @AngularClass'; - expect(subject).toEqual(result); - }); - - it('should have header', () => { - let subject = element(by.css('h1')).isPresent(); - let result = true; - expect(subject).toEqual(result); - }); - - it('should have ', () => { - let subject = element(by.css('app home')).isPresent(); - let result = true; - expect(subject).toEqual(result); - }); - - it('should have buttons', () => { - let subject = element(by.css('button')).getText(); - let result = 'Submit Value'; - expect(subject).toEqual(result); - }); - -}); diff --git a/AMW_angular/io/e2e/tsconfig.json b/AMW_angular/io/e2e/tsconfig.json deleted file mode 100644 index c92199cfd..000000000 --- a/AMW_angular/io/e2e/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/e2e", - "module": "commonjs", - "target": "es2018", - "types": [ - "jasmine", - "jasminewd2", - "node" - ] - } -} diff --git a/AMW_angular/io/package.json b/AMW_angular/io/package.json index e499b8837..855a4e04d 100644 --- a/AMW_angular/io/package.json +++ b/AMW_angular/io/package.json @@ -11,7 +11,6 @@ "test": "ng test", "test-headless": "ng test --browsers=ChromeHeadless", "lint": "ng lint", - "e2e": "ng e2e", "mavenbuild": "ng test --watch=false --browsers=ChromeHeadless && ng build --configuration production" }, "private": true, @@ -54,7 +53,6 @@ "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "^2.1.0", "prettier": "3.0.3", - "protractor": "~7.0.0", "ts-node": "~10.9.1", "tslint": "~6.1.3", "typescript": "~5.1.5" diff --git a/AMW_e2e/package-lock.json b/AMW_e2e/package-lock.json index 07b976237..f6be95bf8 100644 --- a/AMW_e2e/package-lock.json +++ b/AMW_e2e/package-lock.json @@ -8,12 +8,9 @@ "name": "amw_e2e", "version": "1.0.0", "license": "ISC", - "dependencies": { - "wait-on": "^7.1.0" - }, "devDependencies": { "cypress": "^13.5.0", - "start-server-and-test": "^2.0.2" + "wait-on": "^7.1.0" } }, "node_modules/@colors/colors": { @@ -3738,8 +3735,7 @@ } }, "start-server-and-test": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-2.0.2.tgz", + "version": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-2.0.2.tgz", "integrity": "sha512-4sGS2QmETUwqeBUqtTLP7OqXp3PdDnevaWlPlrFQgn8+7uCgVg4Do7/H/ZhAAVyvnL3DqKyANhnLgcgxrjhrMA==", "dev": true, "requires": {