-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run QUnit tests on SauceLabs against a set of browsers.
- Loading branch information
Showing
6 changed files
with
105 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,15 @@ env: | |
- GIT_NAME: "'Couscous auto deploy'" | ||
- GIT_EMAIL: [email protected] | ||
- GH_REF: github.com/swisnl/jQuery-contextMenu | ||
- SAUCE_USERNAME: "bbrala-contextmenu" | ||
- secure: XaE2bPODLwmzaNAKv9pA8mMiXJc8OrpyrO5tIGuOCwfQ+q7hx6Xa/tTcyn5+H2g+xYyJ0Qqv5+SDkDxbbgaVJLR1VEW15KEcZbD/3speqkg+yIC/oFxgbf1Ib01f0FowR2cw4/5Y2XzCM8CU7UxOLFGBDDCvM39Ab3UUl4uB/8g= | ||
- secure: UOse3txRLxLQKsPVQf6OKZZP3c0nLaPJ+4G2vR/qJqBXCTTCQ84+9qx9ih/40FDFcjVXwabJsdn0EhkqDw4h50OGdc58V1UfSbk7g1RiuvvRakOPTK0J9h7bEkBPb7QQXCvAVfOZ81DN6l5lMjmH1tiC2T/h/MNOLHPXsbzXElg= | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
- documentation/vendor | ||
|
||
matrix: | ||
include: | ||
- env: JQUERY=1 php=5.5 | ||
|
@@ -18,10 +26,10 @@ matrix: | |
|
||
|
||
install: | ||
- if [ "$JQUERY" ] ; then nvm install 6 && npm install && npm install jquery@$JQUERY && npm test ; fi | ||
- if [ "$JQUERY" ] ; then nvm install 6 && npm install && npm install jquery@$JQUERY ; fi | ||
- if [ "$DOCUMENTATION" ] ; then cd documentation && composer global require couscous/couscous ; fi | ||
|
||
script: if [ "$JQUERY" ] ; then npm test ; else /home/travis/.composer/vendor/bin/couscous travis-auto-deploy --php-version=5.5 ; fi | ||
script: if [ "$JQUERY" ] ; then npm test && npm run test-sauce ; else /home/travis/.composer/vendor/bin/couscous travis-auto-deploy --php-version=5.5 ; fi | ||
|
||
deploy: | ||
provider: npm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
|
||
module.exports = function (config) { | ||
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) { | ||
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.') | ||
process.exit(1) | ||
} | ||
|
||
var testedCapabilities = {}; | ||
var browsers = []; | ||
|
||
var capabilities = { | ||
'Windows 7': { | ||
'internet explorer': ['11', '10', '9'], | ||
}, | ||
'Windows 10': { | ||
'firefox': ['latest', 'latest-1', 'latest-2'], | ||
'chrome': ['latest', 'latest-1', 'latest-2'], | ||
'MicrosoftEdge': ['latest'] | ||
}, | ||
'macOS 10.12': { | ||
'firefox': ['latest'], | ||
'chrome': ['latest'], | ||
'safari': ['latest'] | ||
} | ||
}; | ||
|
||
var buildDate = new Date().toISOString(); | ||
for (var osVersion in capabilities) { | ||
for (var browserKey in capabilities[osVersion]) { | ||
for(var i=0; i< capabilities[osVersion][browserKey].length; i++){ | ||
var browserVersion = capabilities[osVersion][browserKey][i]; | ||
testedCapabilities[osVersion + ' ' + browserKey + ' ' + browserVersion] = { | ||
base: 'SauceLabs', | ||
platform: osVersion, | ||
browserName: browserKey, | ||
version: browserVersion, | ||
name: osVersion + ' ' + browserKey + ' ' + browserVersion, | ||
build: buildDate | ||
}; | ||
} | ||
|
||
|
||
if(browsers.indexOf(browserKey) == -1){ | ||
browsers.push(browsers); | ||
} | ||
} | ||
} | ||
|
||
config.set({ | ||
basePath: '', | ||
|
||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ['qunit'], | ||
|
||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
|
||
// dependencies | ||
{ pattern: 'node_modules/jquery/dist/jquery.js', watched: false, served: true, included: true }, | ||
{ pattern: 'src/jquery.ui.position.js', watched: false, served: true, included: true }, | ||
{ pattern: 'src/jquery.contextMenu.js', watched: false, served: true, included: true }, | ||
|
||
// test modules | ||
'test/unit/*.js' | ||
], | ||
|
||
|
||
reporters: ['dots', 'saucelabs'], | ||
port: 9876, | ||
colors: true, | ||
sauceLabs: { | ||
testName: 'jQuery contextMenu saucelabs', | ||
recordScreenshots: false, | ||
connectOptions: { | ||
port: 5757, | ||
logfile: 'sauce_connect.log' | ||
}, | ||
public: 'public' | ||
}, | ||
// Increase timeout in case connection in CI is slow | ||
captureTimeout: 600000, | ||
customLaunchers: testedCapabilities, | ||
browsers: Object.keys(testedCapabilities), | ||
singleRun: true | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters