|
@@ -9,7 +9,7 @@
|
|
|
|
|
|
Hence, provider tokens (Google, Instagram, Dropbox) may be at risk of getting hijacked.
|
|
Hence, provider tokens (Google, Instagram, Dropbox) may be at risk of getting hijacked.
|
|
*/
|
|
*/
|
|
-const { finishUploadTest, startUploadTest } = require('./helper')
|
|
|
|
|
|
+const { finishUploadTest, startUploadTest, uploadWithRetry } = require('./helper')
|
|
const testURL = 'http://localhost:4567/providers'
|
|
const testURL = 'http://localhost:4567/providers'
|
|
|
|
|
|
describe('File upload with Google Drive Provider', () => {
|
|
describe('File upload with Google Drive Provider', () => {
|
|
@@ -29,6 +29,16 @@ describe('File upload with Google Drive Provider', () => {
|
|
await signIntoGoogle(browser)
|
|
await signIntoGoogle(browser)
|
|
await finishUploadTest(browser)
|
|
await finishUploadTest(browser)
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ // not using arrow functions as cb so to keep mocha in the 'this' context
|
|
|
|
+ it('should resume uploads when retry is triggered with Google Drive', async function () {
|
|
|
|
+ if (!process.env.UPPY_GOOGLE_EMAIL) {
|
|
|
|
+ console.log('skipping Google Drive integration test')
|
|
|
|
+ return this.skip()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ await uploadWithRetry(browser, 'GoogleDrive', testURL)
|
|
|
|
+ })
|
|
})
|
|
})
|
|
|
|
|
|
const signIntoGoogle = async (browser) => {
|
|
const signIntoGoogle = async (browser) => {
|