|
@@ -28,14 +28,24 @@ module.exports = function (driver, platform, host) {
|
|
.findElement({css: '.UppyForm input'})
|
|
.findElement({css: '.UppyForm input'})
|
|
.sendKeys(path.join(__dirname, 'image.jpg'))
|
|
.sendKeys(path.join(__dirname, 'image.jpg'))
|
|
|
|
|
|
|
|
+ driver.switchTo().alert().dismiss()
|
|
|
|
+ .catch(function (err) {
|
|
|
|
+ console.log(err)
|
|
|
|
+ })
|
|
|
|
+
|
|
driver.findElement({css: '.UppyForm button'}).click()
|
|
driver.findElement({css: '.UppyForm button'}).click()
|
|
|
|
|
|
|
|
+ driver.switchTo().alert().dismiss()
|
|
|
|
+ .catch(function (err) {
|
|
|
|
+ console.log(err)
|
|
|
|
+ })
|
|
|
|
+
|
|
function isRedirectedAfterUpload () {
|
|
function isRedirectedAfterUpload () {
|
|
// this should close the “Do you want to save this file?” alert when Travis runs the test
|
|
// 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)
|
|
|
|
- // })
|
|
|
|
|
|
+ driver.switchTo().alert().dismiss()
|
|
|
|
+ .catch(function (err) {
|
|
|
|
+ console.log(err)
|
|
|
|
+ })
|
|
|
|
|
|
return driver.getCurrentUrl().then(function (val) {
|
|
return driver.getCurrentUrl().then(function (val) {
|
|
console.log('current url is ', val)
|
|
console.log('current url is ', val)
|