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