diff options
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/wdio')
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/.prettierrc.js | 4 | ||||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/assets/black-80x60.gif | bin | 108 -> 0 bytes | |||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/assets/white-1x2.jpg | bin | 713 -> 0 bytes | |||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh | 9 | ||||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/chrome.js | 40 | ||||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/firefox.js | 25 | ||||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/hooks/index.js | 9 | ||||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/ie.js | 24 | ||||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/safari.js | 24 | ||||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js | 15 | ||||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/test/specs/01-file-upload.js | 4 | ||||
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/wdio.conf.js | 5 |
12 files changed, 28 insertions, 131 deletions
diff --git a/vendor/blueimp/jquery-file-upload/wdio/.prettierrc.js b/vendor/blueimp/jquery-file-upload/wdio/.prettierrc.js index 24237736e..049fe84a3 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/.prettierrc.js +++ b/vendor/blueimp/jquery-file-upload/wdio/.prettierrc.js @@ -1,7 +1,9 @@ 'use strict' module.exports = { + arrowParens: 'avoid', proseWrap: 'always', semi: false, - singleQuote: true + singleQuote: true, + trailingComma: 'none' } diff --git a/vendor/blueimp/jquery-file-upload/wdio/assets/black-80x60.gif b/vendor/blueimp/jquery-file-upload/wdio/assets/black-80x60.gif Binary files differdeleted file mode 100644 index 5814bdaa5..000000000 --- a/vendor/blueimp/jquery-file-upload/wdio/assets/black-80x60.gif +++ /dev/null diff --git a/vendor/blueimp/jquery-file-upload/wdio/assets/white-1x2.jpg b/vendor/blueimp/jquery-file-upload/wdio/assets/white-1x2.jpg Binary files differdeleted file mode 100644 index 10a3d5492..000000000 --- a/vendor/blueimp/jquery-file-upload/wdio/assets/white-1x2.jpg +++ /dev/null diff --git a/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh b/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh index ed9c63e70..d6bee1da7 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh +++ b/vendor/blueimp/jquery-file-upload/wdio/bin/safaridriver.sh @@ -1,5 +1,12 @@ #!/bin/sh +if [ "$1" = -t ]; then + BIN='/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver' + shift +else + BIN=safaridriver +fi + SCREEN='Capture screen' if [ -z "$1" ]; then @@ -14,7 +21,7 @@ else fi echo 'Starting safaridriver on 127.0.0.1:4444 ...' >&2 -safaridriver -p 4444 & pid=$! +"$BIN" -p 4444 & pid=$! # shellcheck disable=SC2064 trap "kill $pid; exit" INT TERM diff --git a/vendor/blueimp/jquery-file-upload/wdio/chrome.js b/vendor/blueimp/jquery-file-upload/wdio/chrome.js deleted file mode 100644 index fc7264417..000000000 --- a/vendor/blueimp/jquery-file-upload/wdio/chrome.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict' - -/* eslint-disable jsdoc/valid-types */ -/** @type WebdriverIO.Config */ -const config = { - hostname: 'chromedriver', - path: '/', - capabilities: [ - { - // Set maxInstances to 1 if screen recordings are enabled: - // maxInstances: 1, - browserName: 'chrome', - 'goog:chromeOptions': { - // Disable headless mode if screen recordings are enabled: - args: ['--headless', '--window-size=1440,900'] - } - } - ], - logLevel: 'warn', - reporters: ['spec'], - framework: 'mocha', - mochaOpts: { - timeout: 60000 - }, - specs: ['test/specs/**/*.js'], - maximizeWindow: true, - screenshots: { - saveOnFail: true - }, - videos: { - enabled: false, - resolution: '1440x900', - startDelay: 500, - stopDelay: 500 - }, - assetsDir: '/home/webdriver/assets/', - baseUrl: 'http://example' -} - -exports.config = Object.assign({}, require('./hooks'), config) diff --git a/vendor/blueimp/jquery-file-upload/wdio/firefox.js b/vendor/blueimp/jquery-file-upload/wdio/firefox.js deleted file mode 100644 index a4403de9e..000000000 --- a/vendor/blueimp/jquery-file-upload/wdio/firefox.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict' - -/* eslint-disable jsdoc/valid-types */ -/** @type WebdriverIO.Config */ -const config = { - hostname: 'geckodriver', - capabilities: [ - { - // geckodriver supports no parallel sessions: - maxInstances: 1, - browserName: 'firefox', - 'moz:firefoxOptions': { - //args: ['-headless', '--window-size=1440,900'] - } - } - ], - videos: { - enabled: true, - resolution: '1440x900', - startDelay: 500, - stopDelay: 500 - } -} - -exports.config = Object.assign({}, require('./chrome').config, config) diff --git a/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js b/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js index 2f0dcd3f6..f369f5614 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js +++ b/vendor/blueimp/jquery-file-upload/wdio/hooks/index.js @@ -5,10 +5,9 @@ const cmds = require('wdio-screen-commands') /* eslint-disable jsdoc/valid-types */ -/** @type WebdriverIO.Config */ +/** @type WebdriverIO.HookFunctions */ const config = { before: async () => { - global.Should = require('chai').should() browser.addCommand('saveScreenshotByName', cmds.saveScreenshotByName) browser.addCommand('saveAndDiffScreenshot', cmds.saveAndDiffScreenshot) if (browser.config.maximizeWindow) await browser.maximizeWindow() @@ -16,10 +15,10 @@ const config = { beforeTest: async test => { await cmds.startScreenRecording(test) }, - afterTest: async test => { + afterTest: async (test, context, result) => { await Promise.all([ - cmds.stopScreenRecording(test), - cmds.saveScreenshotByTest(test) + cmds.stopScreenRecording(test, result), + cmds.saveScreenshotByTest(test, result) ]) } } diff --git a/vendor/blueimp/jquery-file-upload/wdio/ie.js b/vendor/blueimp/jquery-file-upload/wdio/ie.js deleted file mode 100644 index 223a50190..000000000 --- a/vendor/blueimp/jquery-file-upload/wdio/ie.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict' - -/* eslint-disable jsdoc/valid-types */ -/** @type WebdriverIO.Config */ -const config = { - hostname: process.env.WINDOWS_HOST || 'host.docker.internal', - port: 4445, - capabilities: [ - { - // IEDriverServer supports no parallel sessions: - maxInstances: 1, - browserName: 'internet explorer' - } - ], - videos: { - enabled: true, - inputFormat: 'mjpeg', - startDelay: 500, - stopDelay: 500 - }, - assetsDir: process.env.WINDOWS_ASSETS_DIR -} - -exports.config = Object.assign({}, require('./chrome').config, config) diff --git a/vendor/blueimp/jquery-file-upload/wdio/safari.js b/vendor/blueimp/jquery-file-upload/wdio/safari.js deleted file mode 100644 index d252d0d5d..000000000 --- a/vendor/blueimp/jquery-file-upload/wdio/safari.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict' - -/* eslint-disable jsdoc/valid-types */ -/** @type WebdriverIO.Config */ -const config = { - // Docker for Mac host address: - hostname: 'host.docker.internal', - capabilities: [ - { - // safaridriver supports no parallel sessions: - maxInstances: 1, - browserName: 'safari' - } - ], - videos: { - enabled: true, - inputFormat: 'mjpeg', - startDelay: 500, - stopDelay: 500 - }, - assetsDir: process.env.MACOS_ASSETS_DIR -} - -exports.config = Object.assign({}, require('./chrome').config, config) diff --git a/vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js b/vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js index dfef36394..eccb6feb4 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js +++ b/vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js @@ -36,7 +36,7 @@ class FileUpload { */ open(timeout) { browser.url('/') - this.fileinput.waitForExist(timeout) + this.fileinput.waitForExist({ timeout }) return this } /** @@ -48,10 +48,10 @@ class FileUpload { */ upload(files, timeout) { this.fileinput.addValue(files.join('\n')) - browser.waitUntil(() => !this.processing.length, timeout) + browser.waitUntil(() => !this.processing.length, { timeout }) this.start.click() - browser.waitUntil(() => !!this.downloads.length, timeout) - browser.waitUntil(() => !this.uploads.length, timeout) + browser.waitUntil(() => !!this.downloads.length, { timeout }) + browser.waitUntil(() => !this.uploads.length, { timeout }) return this } /** @@ -62,12 +62,11 @@ class FileUpload { */ delete(timeout) { this.toggle.click() - browser.waitUntil( - () => this.downloads.length === this.checked.length, + browser.waitUntil(() => this.downloads.length === this.checked.length, { timeout - ) + }) this.remove.click() - browser.waitUntil(() => !this.downloads.length, timeout) + browser.waitUntil(() => !this.downloads.length, { timeout }) return this } } diff --git a/vendor/blueimp/jquery-file-upload/wdio/test/specs/01-file-upload.js b/vendor/blueimp/jquery-file-upload/wdio/test/specs/01-file-upload.js index 156dcc718..95e77e7d8 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/test/specs/01-file-upload.js +++ b/vendor/blueimp/jquery-file-upload/wdio/test/specs/01-file-upload.js @@ -10,8 +10,8 @@ describe('File Upload', () => { it('uploads files', () => { FileUpload.open().upload([ - assetsDir + 'black-80x60.gif', - assetsDir + 'white-1x2.jpg' + assetsDir + 'black+white-60x40.gif', + assetsDir + 'black+white-3x2.jpg' ]) browser.saveAndDiffScreenshot('Files uploaded') }) diff --git a/vendor/blueimp/jquery-file-upload/wdio/wdio.conf.js b/vendor/blueimp/jquery-file-upload/wdio/wdio.conf.js index eb078d844..b19783d1a 100644 --- a/vendor/blueimp/jquery-file-upload/wdio/wdio.conf.js +++ b/vendor/blueimp/jquery-file-upload/wdio/wdio.conf.js @@ -1 +1,4 @@ -chrome.js
\ No newline at end of file +'use strict' + +// Default to the Chrome config: +exports.config = require('./conf/chrome').config |