uppy/test/endtoend/url-plugin/main.js
Renée Kooi 0a40f2c444
Update webdriverio to v5 (#1675)
* build: update webdriverio to v5

* build: update wdio services config syntax

* e2e test updates for wdio 5

* Sync pinned versions between repo root and companion

* build: enable all e2e tests for this PR run

* waitForExist

* test: await browser.url() calls

* test: awaitify url-plugin test

* test: use sauceConnect

* test: upload files to sauce before using them

* fall back to fakechoosefile a lot?

* fall back to fakechoosefile more

* Disable file selection on saucelabs

* test: need to await this thing

* test: make more-sure that the input is visible

* test: use currently low load transloadit region so i dont have to wait

* test: update but disable xhr-limit

* test: change the order

* test: newer firefoxes

* test: change the order back

* kinda sucks that they only have super old browsers on linux

* ci: disable url-plugin and transloadit e2e tests again

* test: use local tus-node-server for integration tests

* test: use envify to check env variables and select appropriate URL

* test: use companion.test:1080 for tus uploads on Travis

* test: fix env vars in typescript and CRA tests

* test: use getBoundingClientRect, may work better in android

* test: try getSize AND getBoundingClientRect

* test: do not check image width in android

* test: allow retrying tests that are prone to flakiness

* test: be more verbose during e2e tests

* test: force <input> visibility in more tests

* test: warn if using test:endtoend not on CI
2019-07-05 13:45:43 +02:00

24 lines
687 B
JavaScript

require('es6-promise/auto')
require('whatwg-fetch')
const Uppy = require('@uppy/core')
const Dashboard = require('@uppy/dashboard')
const Url = require('@uppy/url')
const Tus = require('@uppy/tus')
const isOnTravis = !!(process.env.TRAVIS && process.env.CI)
const companionUrl = isOnTravis ? 'http://companion.test:3030' : 'http://localhost:3030'
const endpoint = isOnTravis ? 'http://companion.test:1080' : 'http://localhost:1080'
window.uppy = Uppy({
id: 'uppyProvider',
debug: true
})
.use(Dashboard, {
target: '#uppyDashboard',
inline: true
})
.use(Url, {
target: Dashboard,
companionUrl: companionUrl
})
.use(Tus, { endpoint: `${endpoint}/files/` })