Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Commit

Permalink
Travis CI setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-molak committed Jun 13, 2018
1 parent 777a151 commit 8cb0aff
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 17 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sudo: false
language: node_js
notifications:
email: false
node_js:
- '8'
addons:
chrome: stable
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
script:
- npm test
2 changes: 1 addition & 1 deletion features/step_definitions/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { protractor } from 'protractor';
import { serenity } from 'serenity-js';
import { Actor, BrowseTheWeb, Open } from 'serenity-js/lib/screenplay-protractor';

import { CheckIfDisplayedMessage, EnterTheName } from '../../spec/greeter';
import { CheckIfDisplayedMessage, EnterTheName } from '../../test/greeter';

export = function steps() {

Expand Down
27 changes: 16 additions & 11 deletions protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
const
glob = require('glob'),
protractor = require.resolve('protractor'),
node_modules = protractor.substring(0, protractor.lastIndexOf('node_modules') + 'node_modules'.length),
seleniumJar = glob.sync(`${node_modules}/protractor/**/selenium-server-standalone-*.jar`).pop();
const isCI = () => process.env.CI && process.env.CI === 'true';

/**
* To learn more about the protractor.conf.js check out:
* https://github.com/angular/protractor/blob/master/lib/config.ts
*/
exports.config = {

baseUrl: 'https://www.angularjs.org/',

seleniumServerJar: seleniumJar,
directConnect: true,

// https://github.com/angular/protractor/blob/master/docs/timeouts.md
allScriptsTimeout: 110000,

// Load Serenity/JS
framework: 'custom',
frameworkPath: require.resolve('serenity-js'),

Expand All @@ -30,10 +31,14 @@ exports.config = {
chromeOptions: {
args: [
'--disable-infobars',
// "--headless",
// "--disable-gpu",
// "--window-size=1024x768"
]
'--headless',
'--disable-gpu',
'--window-size=800,600'
].

// Required on Travis CI when running the build without sudo
// https://developers.google.com/web/updates/2017/06/headless-karma-mocha-chai#running_it_all_on_travis_ci
concat(isCI() ? ['--no-sandbox'] : [])
}
}
};
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 4 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
"target": "es5",
"lib": [ "es5", "es6" ],
"module": "commonjs",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"declaration": true,
"outDir": "./target/transpiled"
"declaration": true
},

"include": [
"src/**/*.ts",
"spec/**/*.ts"
"test/**/*.ts"
],

"exclude": [
"node_modules",
"examples"
"node_modules"
]
}

0 comments on commit 8cb0aff

Please sign in to comment.