Skip to content

Commit

Permalink
chore(infrastructure): Re-enable SauceLabs. (#314)
Browse files Browse the repository at this point in the history
This PR re-enables Sauce Labs for a number of configurations. Certain configurations are currently presenting issues and are disabled while the causes are investigated. If possible, they will be added later.

In the meantime, this will reenable cross-browser testing.
  • Loading branch information
sgomes authored and traviskaufman committed Feb 22, 2017
1 parent 4d0d587 commit 69389b8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 65 deletions.
21 changes: 6 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
# NOTE: All SauceLabs config info is commented out for now, as until we fix our test infrastructure
# SL will continue to be flaky. Therefore, our tests will run on Firefox ESR using XVFB for the time
# being.

language: node_js
node_js:
- node # stable
- '--lts' # LTS: See https://github.com/creationix/nvm/pull/1070
- node
- --lts # LTS: See https://github.com/creationix/nvm/pull/1070
branches:
only:
- master
before_install:
- 'if [[ -z "$SECURE" ]]; then echo "Using Firefox Fallback"; export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi;'
- master
env:
global:
# - SAUCE_USERNAME=material-sauce
# - secure: AxiBF/aKR7YjYP9WYLcAoeFzm4d1XE0loDxk7+K8npWqWTnSnTe8ewrdPPmqHvQaeUqBYHRsFuBTxPXvPYDs2s5s7EUotLVU83Gh3iQw2dmBvuNi81sXlvXbYyJE7qZ/E418bEZBrfNaZ/Mm37ehoLs0+suSy3UjDacfPltObzF7vWedyOmZa5fRVd2/VoX11MMZybGJykUml4jSSg5qrve1P49SgybUaNnvwMMEzGuRi9jwSngvMsHtjS6uCHE/CWNJla3Zt3qjsKBPcwsSZHm/wNEX7frufZ7ReqTZjsMyOidPjlZfH8Yk5fgM610h7noWeav3l0CwsrEgWX0nFdop/3JUfWodqpXWVrTqd1scna4kFvfAcH9qltqXkxlRzetQrURsUiPHC4RkL8E9bUkol++JNhW4Cur287FxP4NVO5Mo3071dwBU7Jh/aQpq0ANJx/js5bZAUIDsEno3uHZe4LLMUBaowU1Jr03wZnis5A7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yqQOvYctt1YgnKZVlgHTkjxwygl7lqScvfSCmCAvraHAxdY3vLWpyo7fuz7SJigu1LXsjwKoWUF+rl6K0X+rhOUz1RH/+UHzqAABsszMwNkhu8P5Qlx0OHK6FsJ4vk6GrPtSHvKU/xMymdMMaAR2zVmiGISNT5CMZq+Ws4OLvH+9WOKZsgSa3k9QpJEloGt7qRK6OnYxXfQi9Wi3DXvL5nxDrRMb7b+Vf7H4C+oMq+rq1C1KojL5vbs5YKf080PJNhDiyti3H4AvIZI51X5QWL2pP96xdyJ0KQtYccjId8CIG6N5cHZQ59ShaNrulPdI+Jyp4dulO6MNyZJUYtNmSy1O+A0GejBrSavBXydS1zF4Gwfr7iseL1SPc8vauDYxu6zU34QRB2Ira56P+BgjLqZ6mDARnu/uiytRC4cbR2hr5YuHcn5riCb9w8GwI0l53STh63CoMiB5P+Doj5ZFyJZOId6JSckw3/oqx698oQYuqhJiC88Jt/9Vj9VqBGRk8uOcX4ZRgz4mO/6+2aUg/RaEjU=
sauce_connect: true
85 changes: 37 additions & 48 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,82 +19,77 @@ const webpackConfig = require('./webpack.config')[0];

const USING_TRAVISCI = Boolean(process.env.TRAVIS);
const USING_SL = Boolean(process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY);
const IS_SECURE = Boolean(process.env.SECURE);

const SL_LAUNCHERS = {
'sl-chrome-stable': {
base: 'SauceLabs',
browserName: 'chrome',
version: 'latest',
platform: 'OS X 10.11',
platform: 'macOS 10.12',
},
'sl-chrome-beta': {
base: 'SauceLabs',
browserName: 'chrome',
version: 'beta',
platform: 'macOS 10.12',
},
'sl-chrome-previous': {
base: 'SauceLabs',
browserName: 'chrome',
version: 'latest-1',
platform: 'OS X 10.11',
platform: 'macOS 10.12',
},
'sl-firefox-stable': {
base: 'SauceLabs',
browserName: 'firefox',
version: 'latest',
platform: 'Windows 10',
},
'sl-firefox-previous': {
base: 'SauceLabs',
browserName: 'firefox',
version: 'latest-1',
platform: 'Windows 10',
},
// NOTE(traviskaufman): Disabling firefox for now as it has been consistently flaky recently. See
// https://github.com/material-components/material-components-web/issues/5
// 'sl-firefox-stable': {
// base: 'SauceLabs',
// browserName: 'firefox',
// version: 'latest',
// platform: 'Windows 10'
// },
// 'sl-firefox-previous': {
// base: 'SauceLabs',
// browserName: 'firefox',
// version: 'latest-1',
// platform: 'Windows 10'
// },
'sl-ie': {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '11',
platform: 'Windows 8.1',
},
'sl-android-stable': {
base: 'SauceLabs',
browserName: 'android',
version: '5.0',
},
// NOTE(traviskaufman): Temporarily disabling these browsers as they are consistently flaky using
// Sauce Labs and almost always yield false negatives.
// TODO(sgomes): Re-enable Edge and Safari after Sauce Labs problems are fixed.
// 'sl-edge': {
// base: 'SauceLabs',
// browserName: 'microsoftedge',
// version: 'latest',
// platform: 'Windows 10'
// platform: 'Windows 10',
// },
// 'sl-safari-stable': {
// base: 'SauceLabs',
// browserName: 'safari',
// version: '9',
// platform: 'OS X 10.11'
// version: 'latest',
// platform: 'macOS 10.12',
// },
// 'sl-safari-previous': {
// base: 'SauceLabs',
// browserName: 'safari',
// version: '8',
// platform: 'OS X 10.10'
// },
// 'sl-ios-safari-latest': {
// base: 'SauceLabs',
// browserName: 'iphone',
// platform: 'OS X 10.10',
// version: '9.1'
// version: '9.0',
// platform: 'OS X 10.11',
// },
'sl-ios-safari-latest': {
base: 'SauceLabs',
deviceName: 'iPhone Simulator',
platformVersion: '10.0',
platformName: 'iOS',
browserName: 'Safari',
},
// 'sl-ios-safari-previous': {
// base: 'SauceLabs',
// browserName: 'iphone',
// version: '8.4'
// }
// deviceName: 'iPhone Simulator',
// platformVersion: '9.3',
// platformName: 'iOS',
// browserName: 'Safari',
// },
};

module.exports = function(config) {
Expand All @@ -113,7 +108,7 @@ module.exports = function(config) {
logLevel: config.LOG_INFO,
browsers: determineBrowsers(),
browserDisconnectTimeout: 40000,
browserNoActivityTimeout: 480000,
browserNoActivityTimeout: 120000,
captureTimeout: 240000,
concurrency: USING_SL ? 4 : Infinity,
customLaunchers: SL_LAUNCHERS,
Expand Down Expand Up @@ -158,6 +153,8 @@ module.exports = function(config) {
sauceLabs: {
testName: 'Material Components Web Unit Tests - CI',
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
username: process.env.SAUCE_USERNAME,
accessKey: process.env.SAUCE_ACCESS_KEY,
startConnect: false,
},
// Attempt to de-flake Sauce Labs tests on TravisCI.
Expand All @@ -168,13 +165,5 @@ module.exports = function(config) {
};

function determineBrowsers() {
let browsers = USING_SL ? Object.keys(SL_LAUNCHERS) : ['Chrome'];
if (USING_TRAVISCI && !IS_SECURE) {
console.warn(
'NOTICE: Falling back to firefox browser, as travis-ci JWT addon is currently not working ' +
'with Sauce Labs. See - https://github.com/travis-ci/travis-ci/issues/6569'
);
browsers = ['Firefox'];
}
return browsers;
return USING_SL ? Object.keys(SL_LAUNCHERS) : ['Chrome'];
}
4 changes: 2 additions & 2 deletions test/unit/mdc-form-field/mdc-form-field.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test('adapter#deregisterInteractionHandler removes an event listener from the ro

test('adapter#activateInputRipple calls activate on the input ripple', () => {
const {component} = setupTest();
const ripple = td.object();
const ripple = {activate: td.func('activate')};
const input = {ripple: ripple};

component.input = input;
Expand All @@ -100,7 +100,7 @@ test('adapter#activateInputRipple does not throw if the input has no ripple gett

test('adapter#deactivateInputRipple calls deactivate on the input ripple', () => {
const {component} = setupTest();
const ripple = td.object();
const ripple = {deactivate: td.func('deactivate')};
const input = {ripple: ripple};

component.input = input;
Expand Down

0 comments on commit 69389b8

Please sign in to comment.