浏览代码

going crazy

Artur Paikin 8 年之前
父节点
当前提交
29667e15af
共有 1 个文件被更改,包括 14 次插入4 次删除
  1. 14 4
      test/acceptance/fallback.spec.js

+ 14 - 4
test/acceptance/fallback.spec.js

@@ -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)