mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 11:14:05 +00:00
move alert dismiss command to isRedirectedAfterUpload
This commit is contained in:
parent
e3a5e6b156
commit
3cd8d7aebf
1 changed files with 6 additions and 5 deletions
|
|
@ -25,12 +25,13 @@ module.exports = function (driver, platform, host) {
|
|||
|
||||
driver.findElement({css: '.UppyForm button'}).click()
|
||||
|
||||
// this should solve some mysterious alert error when Travis runs the test
|
||||
driver.switchTo().alert().accept().catch(function (err) {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
function isRedirectedAfterUpload () {
|
||||
// this should close the “Do you want to save this file?” alert when Travis runs the test
|
||||
driver.switchTo().alert().dismiss()
|
||||
.catch(function (err) {
|
||||
console.log(err)
|
||||
})
|
||||
|
||||
return driver.getCurrentUrl().then(function (val) {
|
||||
console.log('current url is ', val)
|
||||
var isPageRedirected = val.indexOf('api2.transloadit.com') !== -1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue