Skip to content
27 changes: 10 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,13 @@ env:
- DOCKER_USER=bwsw
- DOCKER_REPO=cloudstack-ui

before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb

before_deploy:
- docker build -t ${DOCKER_USER}/${DOCKER_REPO} .

deploy:
- provider: script
script: ./scripts/publish-docker-image.sh
on:
all_branches: true
install:
- yarn

before_script:
- echo $PROXY_CONF | base64 -d > ./proxy-conf.js

script:
- docker run --rm -v $(pwd):/workspace -w /workspace m7ov/node8-chrome:0.1 /bin/bash -ce "npm install && npm run webdriver-clean && npm run webdriver-2.35 && npm run e2e"
- docker stop cloudstack-simulator-e2e

6 changes: 4 additions & 2 deletions e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { CloudstackUiPage } from './app.po';
import {browser} from 'protractor';

describe('cloudstack-ui App', () => {
let page: CloudstackUiPage;
Expand All @@ -7,8 +8,9 @@ describe('cloudstack-ui App', () => {
page = new CloudstackUiPage();
});

it('should display welcome message', () => {
it('should display logo', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!!');
browser.waitForAngular();
expect(page.getLogo().isPresent()).toBeTruthy();
});
});
6 changes: 3 additions & 3 deletions e2e/app.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { browser, by, element } from 'protractor';

export class CloudstackUiPage {
navigateTo() {
return browser.get('/');
return browser.get('/bwsw/master/login');
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
getLogo() {
return element(by.css('.logo'));
}
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"lint": "ng lint",
"lint:report": "mkdir -p reports; ng lint -t checkstyle > reports/checkstyle-result.xml",
"e2e": "ng e2e",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
"e2e-no-update": "ng e2e --webdriver-update false",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"webdriver-clean": "./node_modules/.bin/webdriver-manager clean",
"webdriver-2.35": "./node_modules/.bin/webdriver-manager update --versions.chrome 2.35"
},
"private": true,
"dependencies": {
Expand Down
7 changes: 5 additions & 2 deletions protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ exports.config = {
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
'browserName': 'chrome',
'chromeOptions': {
'args': ['no-sandbox']
}
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
baseUrl: 'http://localhost:49152',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
Expand Down