Browse Source

try with fake file only and 5 seconds

Artur Paikin 4 years ago
parent
commit
c42b66f7b7
1 changed files with 12 additions and 11 deletions
  1. 12 11
      test/endtoend/i18n-drag-drop/test.js

+ 12 - 11
test/endtoend/i18n-drag-drop/test.js

@@ -1,6 +1,6 @@
-/* global browser, expect, capabilities  */
-const path = require('path')
-const { selectFakeFile, supportsChooseFile, ensureInputVisible } = require('../utils')
+/* global browser, expect  */
+// const path = require('path')
+const { selectFakeFile, ensureInputVisible } = require('../utils')
 
 const testURL = 'http://localhost:4567/i18n-drag-drop'
 
@@ -13,14 +13,15 @@ describe('File upload with DragDrop + XHRUpload, i18n translated string', functi
   })
 
   it('should upload a file with XHRUpload and set progressbar to 100%', async () => {
-    const testImage = path.join(__dirname, '../../resources/image.jpg')
-    if (supportsChooseFile(capabilities)) {
-      const input = await browser.$('#uppyi18n .uppy-DragDrop-input')
-      await input.setValue(testImage)
-    } else {
-      await browser.execute(selectFakeFile, 'uppyi18n')
-    }
-    await browser.pause(3000)
+    // const testImage = path.join(__dirname, '../../resources/image.jpg')
+    // if (supportsChooseFile(capabilities)) {
+    //   const input = await browser.$('#uppyi18n .uppy-DragDrop-input')
+    //   await input.setValue(testImage)
+    // } else {
+    //   await browser.execute(selectFakeFile, 'uppyi18n')
+    // }
+    await browser.execute(selectFakeFile, 'uppyi18n')
+    await browser.pause(5000)
     const percent = await browser.$('#uppyi18n-progress .uppy-ProgressBar-percentage')
     const html = await percent.getHTML(false)
     expect(parseInt(html)).to.be.equal(100)