aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/blueimp/jquery-file-upload/wdio/test/pages
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-10-08 12:24:19 +0000
committerMario <mario@mariovavti.com>2021-10-08 12:24:19 +0000
commite6dac085cb1d601da1fc63bfd59d811612fa6ef4 (patch)
treef5b704b613c9c8d347857b4e7f8dd0b19cdd7df3 /vendor/blueimp/jquery-file-upload/wdio/test/pages
parentf5f357060bf0ebcb0b8352519375953d993437e7 (diff)
downloadvolse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.tar.gz
volse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.tar.bz2
volse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.zip
update composer libs
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/wdio/test/pages')
-rw-r--r--vendor/blueimp/jquery-file-upload/wdio/test/pages/file-upload.js45
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
}
}