mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-22 01:40:29 +00:00
* Split up integration tests. * Remove unused bits from xhr-limit integration test. * Use a shared base config for local and remote webdriver tests. * Remove npmignores These are no longer needed because we publish from packages/* and not the root. * Keep xhr-limit disabled because it still does not work * Extract integration test helper functions to utils.js. * Stash React integration test stub * Fix build steps for CRA integration test. * Add Webpack CSS test and CRA mount/unmount test * Add DashboardModal integration tests. * Add suites to wdio so we can run single tests. * Fix create-react-app CI build.
26 lines
690 B
JavaScript
26 lines
690 B
JavaScript
/* global window, capabilities */
|
||
|
||
function selectFakeFile (uppyID) {
|
||
var blob = new Blob(
|
||
['data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTIwIDEyMCI+CiAgPGNpcmNsZSBjeD0iNjAiIGN5PSI2MCIgcj0iNTAiLz4KPC9zdmc+Cg=='],
|
||
{ type: 'image/svg+xml' }
|
||
)
|
||
window[uppyID].addFile({
|
||
source: 'test',
|
||
name: 'test-file',
|
||
type: blob.type,
|
||
data: blob
|
||
})
|
||
}
|
||
|
||
function supportsChooseFile () {
|
||
// Webdriver for Safari and Edge doesn’t support .chooseFile
|
||
return capabilities.browserName !== 'safari' &&
|
||
capabilities.browserName !== 'MicrosoftEdge' &&
|
||
capabilities.platformName !== 'Android'
|
||
}
|
||
|
||
module.exports = {
|
||
selectFakeFile,
|
||
supportsChooseFile
|
||
}
|