Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests in all environments #15

Merged
merged 2 commits into from
Nov 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ steps:
'docker-compose#v1.7.0':
run: browser-tests-linters
- name: ':saucelabs: :selenium:'
command: .buildkite/runAllTests
command: .buildkite/run-all-tests.sh
plugins:
'docker-compose#v1.7.0':
run: browser-tests
11 changes: 6 additions & 5 deletions .buildkite/runAllTests → .buildkite/run-all-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ nightwatch --config nightwatch-ci.js --env safari-7
nightwatch --config nightwatch-ci.js --env safari-9
nightwatch --config nightwatch-ci.js --env safari-11
nightwatch --config nightwatch-ci.js --env ie-9
# nightwatch --config nightwatch-ci.js --env ie-11 ("Promise is not defined")
nightwatch --config nightwatch-ci.js --env ie-11
nightwatch --config nightwatch-ci.js --env edge
# nightwatch --config nightwatch-ci.js --env samsung-S3 ("Error processing the server response")
# nightwatch --config nightwatch-ci.js --env samsung-G4 ("Map is not defined")
nightwatch --config nightwatch-ci.js --env samsung-S3
nightwatch --config nightwatch-ci.js --env samsung-G4
nightwatch --config nightwatch-ci.js --env iPhone-4S
nightwatch --config nightwatch-ci.js --env iPhone-X
# nightwatch --config nightwatch-ci.js --env kindleFire ("Map is not defined")
# skipping iphone X for now as tests are taking a very long time to complete
# nightwatch --config nightwatch-ci.js --env iPhone-X
nightwatch --config nightwatch-ci.js --env kindleFire
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,21 @@ After each push Buildkite runs cross-browser UI tests over core libraries and pl
## Running Ad hoc chrome and firefox tests locally

In Chrome
`npm run test-chrome`
`yarn test-chrome`
In Firefox
`npm run test-firefox`
`yarn test-firefox`

## Running Ad hoc cross-browser tests remotely

(For convenience you should add SAUCE\_USERNAME and SAUCE\_ACCESS_KEY as environment variables)

1. Start the app server\
`npm run dev`
`yarn dev`
1. Start sauce connect\
`sc -u <saucelabs username> -k <saucelabs access key>`
1. Run the tests remotely passing environment\
`npm run test-remote -- --env ie-11`
1. Run the tests remotely\
run specific test: `yarn test-remote -- --env ie-11`\
run all tests: `yarn test-remote`

## The Tests

Expand Down
123 changes: 7 additions & 116 deletions nightwatch-ci.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* globals module, process */
/* globals module, process, require */

const environments = require('./selenium-environments');

const JOB_IDENTIFIER = process.env.BUILDKITE_BUILD_NUMBER;
const BINPATH = './node_modules/nightwatch/bin/';

module.exports = {
const settings = {
src_folders: ['src/test/browser/index.js'],
output_folder: 'reports',
custom_commands_path: '',
Expand Down Expand Up @@ -33,119 +35,8 @@ module.exports = {
'tunnel-identifier': JOB_IDENTIFIER,
},
},

'chrome-mac': {
desiredCapabilities: {
browserName: 'chrome',
platform: 'macOS 10.12',
},
},

'chrome-windows': {
desiredCapabilities: {
browserName: 'chrome',
platform: 'Windows 10',
},
},

'safari-11': {
desiredCapabilities: {
browserName: 'safari',
platform: 'macOS 10.12',
version: '11.0',
},
},

'safari-9': {
desiredCapabilities: {
browserName: 'safari',
platform: 'OS X 10.11',
version: '9.0',
},
},

'safari-7': {
desiredCapabilities: {
browserName: 'safari',
platform: 'OS X 10.9',
version: '7.0',
},
},

'ie-11': {
desiredCapabilities: {
browserName: 'internet explorer',
platform: 'Windows 10',
version: '11.103',
},
},

'ie-9': {
desiredCapabilities: {
browserName: 'internet explorer',
platform: 'Windows 7',
version: '9.0',
},
},

'firefox-13': {
browserName: 'firefox',
platform: 'Windows 7',
version: '13.0',
},

edge: {
desiredCapabilities: {
browserName: 'MicrosoftEdge',
},
},

'samsung-S3': {
desiredCapabilities: {
browserName: 'Android',
deviceName: 'Samsung Galaxy S3 Emulator',
deviceOrientation: 'portrait',
platformVersion: '4.4',
platformName: 'Android',
},
},

'samsung-G4': {
desiredCapabilities: {
browserName: 'Android',
deviceName: 'Samsung Galaxy S4 GoogleAPI Emulator',
deviceOrientation: 'portrait',
},
},

'iPhone-4S': {
desiredCapabilities: {
browserName: 'Safari',
deviceName: 'iPhone 4s Simulator',
deviceOrientation: 'portrait',
platformVersion: '8.1',
platformName: 'iOS',
},
},

'iPhone-X': {
desiredCapabilities: {
browserName: 'Safari',
deviceName: 'iPhone X Simulator',
deviceOrientation: 'portrait',
platformVersion: '11.0',
platformName: 'iOS',
},
},

kindleFire: {
desiredCapabilities: {
browserName: 'Browser',
deviceName: 'Amazon Kindle Fire HD 8.9 GoogleAPI Emulator',
deviceOrientation: 'portrait',
platformVersion: '4.4',
platformName: 'Android',
},
},
},
};

Object.assign(settings.test_settings, environments);
module.exports = settings;
123 changes: 7 additions & 116 deletions nightwatch-remote.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* globals module, process */
/* globals module, process, require */

module.exports = {
const environments = require('./selenium-environments');

const settings = {
src_folders: ['src/test/browser/index.js'],
output_folder: 'reports',
custom_commands_path: '',
Expand Down Expand Up @@ -28,119 +30,8 @@ module.exports = {
username: process.env.SAUCE_USERNAME,
access_key: process.env.SAUCE_ACCESS_KEY,
},

'chrome-mac': {
desiredCapabilities: {
browserName: 'chrome',
platform: 'macOS 10.12',
},
},

'chrome-windows': {
desiredCapabilities: {
browserName: 'chrome',
platform: 'Windows 10',
},
},

'safari-11': {
desiredCapabilities: {
browserName: 'safari',
platform: 'macOS 10.12',
version: '11.0',
},
},

'safari-mac-9': {
desiredCapabilities: {
browserName: 'safari',
platform: 'OS X 10.11',
version: '9.0',
},
},

'safari-mac-7': {
desiredCapabilities: {
browserName: 'safari',
platform: 'OS X 10.9',
version: '7.0',
},
},

'ie-11': {
desiredCapabilities: {
browserName: 'internet explorer',
platform: 'Windows 10',
version: '11.103',
},
},

'ie-8': {
desiredCapabilities: {
browserName: 'internet explorer',
platform: 'Windows 7',
version: '8.0',
},
},

'firefox-13': {
browserName: 'firefox',
platform: 'Windows 7',
version: '13.0',
},

edge: {
desiredCapabilities: {
browserName: 'MicrosoftEdge',
},
},

'samsung-S3': {
desiredCapabilities: {
browserName: 'Android',
deviceName: 'Samsung Galaxy S3 Emulator',
deviceOrientation: 'portrait',
platformVersion: '4.4',
platformName: 'Android',
},
},

'samsung-G4': {
desiredCapabilities: {
browserName: 'Android',
deviceName: 'Samsung Galaxy S4 GoogleAPI Emulator',
deviceOrientation: 'portrait',
},
},

'iPhone-4S': {
desiredCapabilities: {
browserName: 'Safari',
deviceName: 'iPhone 4s Simulator',
deviceOrientation: 'portrait',
platformVersion: '8.1',
platformName: 'iOS',
},
},

'iPhone-X': {
desiredCapabilities: {
browserName: 'Safari',
deviceName: 'iPhone X Simulator',
deviceOrientation: 'portrait',
platformVersion: '11.0',
platformName: 'iOS',
},
},

kindleFire: {
desiredCapabilities: {
browserName: 'Browser',
deviceName: 'Amazon Kindle Fire HD 8.9 GoogleAPI Emulator',
deviceOrientation: 'portrait',
platformVersion: '4.4',
platformName: 'Android',
},
},
},
};

Object.assign(settings.test_settings, environments);
module.exports = settings;
Loading