diff options
author | Mario <mario@mariovavti.com> | 2021-11-09 09:10:19 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-11-09 09:10:19 +0000 |
commit | fe7ecede700fe04631d23f36473e697ce2b364dc (patch) | |
tree | e713fc39dba500a25cb2acf8561e286fb8b41ff0 /vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js | |
parent | 42de18d96d201d74e5df3ed1b8f6132cb00357b6 (diff) | |
parent | 089708ab9f90309a0c27ae633cf8f2604fce1170 (diff) | |
download | volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.tar.gz volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.tar.bz2 volse-hubzilla-fe7ecede700fe04631d23f36473e697ce2b364dc.zip |
Merge branch '6.4RC'6.4
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js')
-rw-r--r-- | vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js | 45 |
1 files changed, 25 insertions, 20 deletions
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 eccb6feb4..32ba5c39a 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 @@ -32,42 +32,47 @@ class FileUpload { * Opens the file upload form. * * @param {number} [timeout] Wait timeout - * @returns {FileUpload} FileUpload object */ - open(timeout) { - browser.url('/') - this.fileinput.waitForExist({ timeout }) - return this + async open(timeout) { + await browser.url('/') + await this.fileinput.waitForExist({ timeout }) } /** * Uploads files. * * @param {Array<string>} files Files to upload * @param {number} [timeout] Wait timeout - * @returns {FileUpload} FileUpload object */ - upload(files, timeout) { - this.fileinput.addValue(files.join('\n')) - browser.waitUntil(() => !this.processing.length, { timeout }) - this.start.click() - browser.waitUntil(() => !!this.downloads.length, { timeout }) - browser.waitUntil(() => !this.uploads.length, { timeout }) - return this + async upload(files, timeout) { + await this.fileinput.addValue(files.join('\n')) + await browser.waitUntil(async () => !(await this.processing.length), { + timeout + }) + await this.start.click() + await browser.waitUntil(async () => !!(await this.downloads.length), { + timeout + }) + await browser.waitUntil(async () => !(await this.uploads.length), { + timeout + }) } /** * Deletes uploaded files. * * @param {number} [timeout] Wait timeout - * @returns {FileUpload} FileUpload object */ - delete(timeout) { - this.toggle.click() - browser.waitUntil(() => this.downloads.length === this.checked.length, { + async delete(timeout) { + await this.toggle.click() + await browser.waitUntil( + async () => (await this.downloads.length) === (await this.checked.length), + { + timeout + } + ) + await this.remove.click() + await browser.waitUntil(async () => !(await this.downloads.length), { timeout }) - this.remove.click() - browser.waitUntil(() => !this.downloads.length, { timeout }) - return this } } |