Skip to content

Commit

Permalink
Update wct and travis config
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Sep 3, 2018
1 parent ac40325 commit 56a5c5e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 35 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: true
sudo: false
dist: trusty
language: node_js
node_js: 8.9
node_js: 8.11

cache:
directories:
Expand All @@ -12,6 +12,7 @@ addons:
chrome: stable

install:
- npm i -g polymer-cli
- npm install
- polymer install

Expand Down
20 changes: 1 addition & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,6 @@
"preversion": "gulp version:update"
},
"devDependencies": {
"bower": "latest",
"eslint": "^4.0.0",
"eslint-config-vaadin": "latest",
"eslint-plugin-html": "^4.0.0",
"gulp": "latest",
"gulp-clip-empty-files": "^0.1.2",
"gulp-eslint": "^4.0.0",
"gulp-expect-file": "0.0.7",
"gulp-find": "0.0.10",
"gulp-git": "^2.4.2",
"gulp-grep-contents": "0.0.1",
"gulp-html-extract": "^0.3.0",
"gulp-replace": "^0.6.1",
"gulp-stylelint": "^7.0.0",
"polymer-cli": "^1.6.0",
"stylelint": "^9.0.0",
"stylelint-config-vaadin": "latest",
"web-component-tester": "^6.1.5",
"yargs": "^8.0.0"
"@vaadin/vaadin-component-dev-dependencies": "^1.0.0"
}
}
57 changes: 43 additions & 14 deletions wct.conf.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,54 @@
var argv = require('yargs').argv;
var envIndex = process.argv.indexOf('--env') + 1;
var env = envIndex ? process.argv[envIndex] : undefined;

module.exports = {
testTimeout: 180 * 1000,
verbose: false,
plugins: {
local: {
browserOptions: {
chrome: [
'headless',
'disable-gpu',
'no-sandbox'
]
}
}
},

registerHooks: function(context) {
var saucelabsPlatforms = [
'macOS 10.12/[email protected]',
'macOS 10.12/[email protected]',
'Windows 10/microsoftedge@15',
'Windows 10/internet explorer@11',
'macOS 10.12/[email protected]',
'macOS 9.3.2/[email protected]'
const saucelabsPlatformsMobile = [
'iOS Simulator/[email protected]',
'iOS Simulator/[email protected]'
];

var cronPlatforms = [
'Windows 10/chrome@59',
'Windows 10/firefox@54'
const saucelabsPlatformsDesktop = [
'macOS 10.13/[email protected]',
'Windows 10/microsoftedge@17',
'Windows 10/internet explorer@11'
];

if (argv.env === 'saucelabs') {
context.options.plugins.sauce.browsers = saucelabsPlatforms;
const saucelabsPlatforms = [
...saucelabsPlatformsMobile,
...saucelabsPlatformsDesktop
];

} else if (argv.env === 'saucelabs-cron') {
const cronPlatforms = [
{
deviceName: 'Android GoogleAPI Emulator',
platformName: 'Android',
platformVersion: '7.1',
browserName: 'chrome'
},
'iOS Simulator/[email protected]',
'iOS Simulator/[email protected]',
'Windows 10/chrome@latest',
'Windows 10/firefox@latest'
];

if (env === 'saucelabs') {
context.options.plugins.sauce.browsers = saucelabsPlatforms;
} else if (env === 'saucelabs-cron') {
context.options.plugins.sauce.browsers = cronPlatforms;
}
}
Expand Down

0 comments on commit 56a5c5e

Please sign in to comment.