Jelajahi Sumber

e2e tests: Move transloadit2 test into transloadit, remove the former (#3271)

* move transloadit2 test into transloadit, remove the former

* Update endtoend-build-tests

* Revert "move transloadit2 test into transloadit, remove the former"

This reverts commit ff25d4b8cdf72cae7e8e1a982aced86069565778.

* Revert "Update endtoend-build-tests"

This reverts commit 723f48fc0367e648ff575ca8dd2a186208507f0e.

* rename transloadit2 to transloadit-assembly-options

* timeout option is nested now https://webdriver.io/docs/api/element/waitForExist/
Artur Paikin 3 tahun lalu
induk
melakukan
01158d7445

+ 1 - 1
bin/endtoend-build-tests

@@ -12,7 +12,7 @@ __base="$(basename ${__file} .sh)"
 __root="$(cd "$(dirname "${__dir}")" && pwd)"
 
 # Tests using a simple build setup.
-tests="chaos-monkey i18n-drag-drop providers thumbnails transloadit transloadit2 tus-drag-drop url-plugin xhr-limit"
+tests="chaos-monkey i18n-drag-drop providers thumbnails transloadit transloadit-assembly-options tus-drag-drop url-plugin xhr-limit"
 
 for t in $tests; do
   mkdir -p "${__root}/test/endtoend/$t/dist"

+ 0 - 0
test/endtoend/transloadit2/index.html → test/endtoend/transloadit-assembly-options/index.html


+ 0 - 0
test/endtoend/transloadit2/main.js → test/endtoend/transloadit-assembly-options/main.js


+ 2 - 3
test/endtoend/transloadit2/test.js → test/endtoend/transloadit-assembly-options/test.js

@@ -3,7 +3,7 @@ const path = require('path')
 const fs = require('fs')
 const { selectFakeFile, supportsChooseFile, ensureInputVisible } = require('../utils')
 
-const testURL = 'http://localhost:4567/transloadit2'
+const testURL = 'http://localhost:4567/transloadit-assembly-options'
 
 function setTransloaditKeyAndInit (transloaditKey) {
   window.initUppyTransloadit(transloaditKey)
@@ -43,9 +43,8 @@ describe('Transloadit getAssemblyOptions', () => {
         'image/jpeg', // type
         fs.readFileSync(img, 'base64') // b64
       )
-      // browser.execute(selectFakeFile, 'uppyTransloadit')
     }
-    await result.waitForExist(25000)
+    await result.waitForExist({ timeout: 25000 })
     const text = await result.getText()
     expect(text).to.be.equal('ok')
   })

+ 1 - 2
test/endtoend/transloadit/test.js

@@ -43,9 +43,8 @@ describe('Transloadit file processing', () => {
         'image/jpeg', // type
         fs.readFileSync(img, 'base64') // b64
       )
-      // browser.execute(selectFakeFile, 'uppyTransloadit')
     }
-    await result.waitForExist(25000)
+    await result.waitForExist({ timeout: 25000 })
     const text = await result.getText()
     expect(text).to.be.equal('ok')
   })

+ 1 - 1
test/endtoend/wdio.base.conf.js

@@ -95,7 +95,7 @@ exports.config = {
         { mount: '/providers', path: './providers/dist' },
         { mount: '/thumbnails', path: './thumbnails/dist' },
         { mount: '/transloadit', path: './transloadit/dist' },
-        { mount: '/transloadit2', path: './transloadit2/dist' },
+        { mount: '/transloadit-assembly-options', path: './transloadit-assembly-options/dist' },
         { mount: '/tus-drag-drop', path: './tus-drag-drop/dist' },
         { mount: '/typescript', path: './typescript/dist' },
         { mount: '/url-plugin', path: './url-plugin/dist' },

+ 1 - 1
website/src/docs/robodog-form.md

@@ -127,7 +127,7 @@ First, change your import URLs and initialization code:
 
 ```html
 <!-- The old jQuery way… -->
-<script src="//assets.transloadit.com/js/jquery.transloadit2-v3-latest.js"></script>
+<script src="//assets.transloadit.com/js/jquery.transloadit-assembly-options-v3-latest.js"></script>
 <script>
 $(selector).transloadit({
   ...options