Reconfigure to run e2e tests without pipe
parent
19f82656f1
commit
e96f07a7fb
|
@ -9,7 +9,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "NODE_ENV=production node server.js",
|
"start": "NODE_ENV=production node server.js",
|
||||||
"dev": "nodemon server.js",
|
"dev": "nodemon server.js",
|
||||||
"test": "mocha --require ./test/config/spec_helper.js"
|
"test": "mocha --require ./test/config/spec_helper.js",
|
||||||
|
"e2e": "NODE_ENV=test node server.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async": "^2.4.0",
|
"async": "^2.4.0",
|
||||||
|
|
|
@ -10,6 +10,10 @@
|
||||||
"deploy-static-prod": "cd ./static && ng build --env=prod && ln -s ../api/resource/ ../public/resource",
|
"deploy-static-prod": "cd ./static && ng build --env=prod && ln -s ../api/resource/ ../public/resource",
|
||||||
"postinstall": "npm install --prefix ./static && npm install --prefix ./api",
|
"postinstall": "npm install --prefix ./static && npm install --prefix ./api",
|
||||||
"mongodb": "mongod --dbpath ./mongodb-data",
|
"mongodb": "mongod --dbpath ./mongodb-data",
|
||||||
"test": "npm test --prefix ./api"
|
"test": "npm test --prefix ./api",
|
||||||
|
"e2e": "npm run deploy-static && concurrently \"npm run e2e --prefix ./api\" \"npm run e2e --prefix ./static\""
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"concurrently": "^3.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,16 @@
|
||||||
import {browser, element, by} from 'protractor';
|
import {browser, element, by} from 'protractor';
|
||||||
|
|
||||||
|
|
||||||
describe('Access Projectmanager Homepage', function () {
|
describe('Main Page Access', function () {
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
browser.get('/')
|
browser.get('/')
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should start at Dashboard page and brand link should redirect there again', () => {
|
it('should open army overview initially', async() => {
|
||||||
const startingPage = 'Dashboard';
|
let elem = element(by.css('h1'));
|
||||||
|
let text = elem.getText();
|
||||||
function validatePage() {
|
expect(text).toBe("Übersicht über alle Spieler, Squads und Armeen");
|
||||||
const dashboardNavEntryCssClass = element(by.linkText(startingPage)).element(by.xpath('..')).getAttribute('class');
|
|
||||||
expect(dashboardNavEntryCssClass).toContain('active');
|
|
||||||
|
|
||||||
const heading = element(by.css('h1'));
|
|
||||||
const headingText = heading.getText();
|
|
||||||
expect(headingText).toBe(startingPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
validatePage();
|
|
||||||
const navBarBrand = element(by.className('navbar-brand'));
|
|
||||||
expect(navBarBrand.getAttribute('href')).toBe(browser.baseUrl + '/#');
|
|
||||||
navBarBrand.click();
|
|
||||||
validatePage();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"pree2e": "webdriver-manager update --standalone false --gecko false",
|
"pree2e": "webdriver-manager update --standalone false --gecko false",
|
||||||
"e2e": "ng e2e"
|
"e2e": "ng e2e --serve=false"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "^4.1.1",
|
"@angular/common": "^4.1.1",
|
||||||
|
@ -34,19 +34,17 @@
|
||||||
"zone.js": "^0.8.5"
|
"zone.js": "^0.8.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jasmine": "^2.5.47",
|
"@types/jasmine": "2.5.38",
|
||||||
"@types/node": "^7.0.21",
|
"@types/node": "~6.0.60",
|
||||||
"@types/socket.io-client": "^1.4.29",
|
"@types/socket.io-client": "^1.4.26",
|
||||||
"codelyzer": "~2.0.0-beta.1",
|
"codelyzer": "~2.0.0-beta.1",
|
||||||
"jasmine-core": "2.5.2",
|
"jasmine-core": "^2.5.2",
|
||||||
"jasmine-spec-reporter": "^4.1.0",
|
"jasmine-spec-reporter": "^3.2.0",
|
||||||
"karma": "1.2.0",
|
"karma": "^1.5.0",
|
||||||
"karma-chrome-launcher": "^2.0.0",
|
"karma-chrome-launcher": "^2.0.0",
|
||||||
"karma-cli": "^1.0.1",
|
"karma-jasmine": "^1.1.0",
|
||||||
"karma-jasmine": "^1.0.2",
|
"karma-spec-reporter": "0.0.30",
|
||||||
"karma-remap-istanbul": "^0.2.1",
|
"protractor": "~5.1.1",
|
||||||
"karma-spec-reporter": "0.0.31",
|
|
||||||
"protractor": "~4.0.13",
|
|
||||||
"protractor-jasmine2-screenshot-reporter": "^0.3.2",
|
"protractor-jasmine2-screenshot-reporter": "^0.3.2",
|
||||||
"ts-node": "1.2.1",
|
"ts-node": "1.2.1",
|
||||||
"tslint": "^4.3.0",
|
"tslint": "^4.3.0",
|
||||||
|
|
|
@ -12,7 +12,7 @@ exports.config= {
|
||||||
'browserName': 'chrome'
|
'browserName': 'chrome'
|
||||||
},
|
},
|
||||||
directConnect: true,
|
directConnect: true,
|
||||||
baseUrl: 'http://localhost:8091',
|
baseUrl: 'http://localhost:3001',
|
||||||
framework: 'jasmine',
|
framework: 'jasmine',
|
||||||
jasmineNodeOpts: {
|
jasmineNodeOpts: {
|
||||||
showColors: true,
|
showColors: true,
|
||||||
|
|
Loading…
Reference in New Issue