Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2018-08-01 11:11:10 +0300
committerJohann-S <johann.servoire@gmail.com>2018-08-30 23:17:15 +0300
commit54d86e6249d90fa8634acd3bc0b78556269edce5 (patch)
tree2bdd488b52c0f28569b5da377bdf9a4c1cd115da /build
parent2f5f8ef755395c1c3bb1663bf22caf93d74738fc (diff)
move away from sauce labs to browserstack
Diffstat (limited to 'build')
-rw-r--r--build/sauce_browsers.json65
-rw-r--r--build/saucelabs-unit-test.js114
2 files changed, 0 insertions, 179 deletions
diff --git a/build/sauce_browsers.json b/build/sauce_browsers.json
deleted file mode 100644
index b112d9c5b1..0000000000
--- a/build/sauce_browsers.json
+++ /dev/null
@@ -1,65 +0,0 @@
-[
- {
- "browserName": "safari",
- "platform": "OS X 10.11",
- "version": "latest"
- },
- {
- "browserName": "chrome",
- "platform": "OS X 10.11",
- "version": "latest"
- },
- {
- "browserName": "firefox",
- "platform": "OS X 10.11",
- "version": "latest"
- },
- {
- "browserName": "MicrosoftEdge",
- "platform": "Windows 10",
- "version": "latest"
- },
- {
- "browserName": "internet explorer",
- "version": "11",
- "platform": "Windows 8.1"
- },
- {
- "browserName": "internet explorer",
- "version": "10",
- "platform": "Windows 8"
- },
- {
- "browserName": "chrome",
- "platform": "Windows 10",
- "version": "latest"
- },
- {
- "browserName": "firefox",
- "platform": "Windows 10",
- "version": "latest"
- },
- {
- "browserName": "iphone",
- "deviceName": "iPhone Simulator",
- "platformName": "OS X 10.11",
- "version": "9.3"
- },
- {
- "browserName": "chrome",
- "platform": "Linux",
- "version": "latest"
- },
- {
- "browserName": "firefox",
- "platform": "Linux",
- "version": "latest"
- },
- {
- "platform": "Linux",
- "browserName": "android",
- "deviceName": "Android Emulator",
- "version": "latest",
- "deviceType": "phone"
- }
-]
diff --git a/build/saucelabs-unit-test.js b/build/saucelabs-unit-test.js
deleted file mode 100644
index a84aa1dfef..0000000000
--- a/build/saucelabs-unit-test.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/*!
- * Script to run our Sauce Labs tests.
- * Copyright 2017-2018 The Bootstrap Authors
- * Copyright 2017-2018 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
-/*
-Docs: https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
-Mac Opera is not currently supported by Sauce Labs
-Win Opera 15+ is not currently supported by Sauce Labs
-iOS Chrome is not currently supported by Sauce Labs
-*/
-
-const path = require('path')
-const JSUnitSaucelabs = require('jsunitsaucelabs')
-
-const jsUnitSaucelabs = new JSUnitSaucelabs({
- username: process.env.SAUCE_USERNAME,
- password: process.env.SAUCE_ACCESS_KEY,
- build: process.env.TRAVIS_JOB_ID
-})
-
-const testURL = 'http://localhost:3000/js/tests/index.html?hidepassed'
-const browsersFile = require(path.resolve(__dirname, './sauce_browsers.json'))
-const errorMessages = [
- 'Test exceeded maximum duration',
- 'Test exceeded maximum duration after 180 seconds'
-]
-let jobsDone = 0
-let jobsSucceeded = 0
-
-const waitingCallback = (error, body, id) => {
- if (error) {
- console.error(error)
- process.exit(1)
- }
-
- if (typeof body !== 'undefined') {
- if (!body.completed) {
- setTimeout(() => {
- jsUnitSaucelabs.getStatus(id, (error, body) => {
- waitingCallback(error, body, id)
- })
- }, 2000)
- } else {
- const test = body['js tests'][0]
- const platform = test.platform.join(', ')
- let passed = false
- let errorStr = false
-
- if (test.result !== null) {
- if (typeof test.result === 'string' && errorMessages.includes(test.result)) {
- errorStr = test.result
- } else {
- passed = test.result.total === test.result.passed
- }
- }
-
- console.log(`Tested ${testURL}`)
- console.log(`Platform: ${platform}`)
- console.log(`Passed: ${passed}`)
- console.log(`URL: ${test.url}\n`)
-
- if (errorStr) {
- console.error(`${platform}: ${errorStr}`)
- }
-
- if (passed) {
- jobsSucceeded++
- }
- jobsDone++
-
- // Exit
- if (jobsDone === browsersFile.length - 1) {
- jsUnitSaucelabs.stop()
- if (jobsDone > jobsSucceeded) {
- const failedTests = jobsDone - jobsSucceeded
- throw new Error(`${failedTests} test${failedTests > 1 ? 's' : ''} failed.`)
- }
-
- console.log('All tests passed')
- process.exit(0)
- }
- }
- }
-}
-
-jsUnitSaucelabs.on('tunnelCreated', () => {
- browsersFile.forEach((tmpBrowser) => {
- const browsersPlatform = typeof tmpBrowser.platform === 'undefined' ? tmpBrowser.platformName : tmpBrowser.platform
- const browsersArray = [browsersPlatform, tmpBrowser.browserName, tmpBrowser.version]
-
- jsUnitSaucelabs.start([browsersArray], testURL, 'qunit', (error, success) => {
- if (typeof success !== 'undefined') {
- const taskIds = success['js tests']
-
- if (!taskIds || taskIds.length === 0) {
- throw new Error('Error starting tests through Sauce Labs API')
- }
-
- taskIds.forEach((id) => {
- jsUnitSaucelabs.getStatus(id, (error, body) => {
- waitingCallback(error, body, id)
- })
- })
- } else {
- console.error(error)
- }
- })
- })
-})
-
-jsUnitSaucelabs.initTunnel()