Skip to content
Snippets Groups Projects
Verified Commit 2309be9b authored by jfriedli's avatar jfriedli
Browse files

fixed upload lib

parent 65b27305
No related branches found
No related tags found
2 merge requests!149Develop,!137Update dependency cypress-file-upload to v3.5.3
Pipeline #32974 passed
......@@ -21,9 +21,8 @@ describe('Download page tests', () => {
let fileNameOne = 'test-image.png'
cy.fixture(fileNameOne).then(fileContent => {
cy.get('.uppy-Dashboard-dropFilesTitle').upload(
{ fileContent: fileContent, fileName: fileNameOne, mimeType: 'image/png' },
{ subjectType: 'drag-n-drop' }
cy.get('.uppy-Dashboard-input').upload(
{ fileContent: fileContent, fileName: fileNameOne, mimeType: 'image/png' }
)
}).then(() => {
cy.get('.uppy-Dashboard-files').contains(fileNameOne)
......@@ -33,9 +32,8 @@ describe('Download page tests', () => {
let fileNameTwo = 'test-image-two.png'
cy.get('.uppy-DashboardContent-addMore').click()
cy.fixture(fileNameTwo).then(fileContent => {
cy.get('.uppy-DashboardTabs-list').upload(
{ fileContent: fileContent, fileName: fileNameTwo, mimeType: 'image/png' },
{ subjectType: 'drag-n-drop' }
cy.get('.uppy-Dashboard-input').upload(
{ fileContent: fileContent, fileName: fileNameTwo, mimeType: 'image/png' }
)
}).then(() => {
cy.get('.uppy-Dashboard-files').contains(fileNameTwo)
......@@ -79,9 +77,8 @@ describe('Download page tests', () => {
let fileNameOne = 'eth_biwi_00546.pdf'
cy.fixture(fileNameOne).then(fileContent => {
cy.get('.uppy-Dashboard-dropFilesTitle').upload(
{ fileContent: fileContent, fileName: fileNameOne, mimeType: 'application/pdf' },
{ subjectType: 'drag-n-drop' }
cy.get('.uppy-Dashboard-input').upload(
{ fileContent: fileContent, fileName: fileNameOne, mimeType: 'application/pdf' }
)
}).then(() => {
cy.get('.uppy-Dashboard-files').contains(fileNameOne)
......@@ -118,9 +115,8 @@ describe('Download page tests', () => {
let fileNameOne = 'a-very-long-name-for-a-very-small-text-file-to-truncate.txt'
cy.fixture(fileNameOne).then(fileContent => {
cy.get('.uppy-Dashboard-dropFilesTitle').upload(
{ fileContent: fileContent, fileName: fileNameOne, mimeType: 'text/plain' },
{ subjectType: 'drag-n-drop' }
cy.get('.uppy-Dashboard-input').upload(
{ fileContent: fileContent, fileName: fileNameOne, mimeType: 'text/plain' }
)
})
cy.get('.uppy-StatusBar-actions > button').click()
......@@ -141,9 +137,8 @@ describe('Download page tests', () => {
{ fileName: 'txt2.txt', fileContent: txtFile, mimeType: 'text/plain' },
{ fileName: 'txt3.txt', fileContent: txtFile, mimeType: 'text/plain' }
]
cy.get('.uppy-Dashboard-dropFilesTitle').upload(
files,
{ subjectType: 'drag-n-drop' }
cy.get('.uppy-Dashboard-input').upload(
files
)
})
cy.get('.uppy-StatusBar-actions > button').click()
......@@ -181,9 +176,8 @@ describe('Upload page negative tests', () => {
const fileName = 'a-very-long-name-for-a-very-small-text-file-to-truncate.txt'
cy.fixture(fileName).then(fileContent => {
cy.get('.uppy-Dashboard-dropFilesTitle').upload(
{ fileContent: fileContent, fileName: fileName, mimeType: 'text/plain' },
{ subjectType: 'drag-n-drop' }
cy.get('.uppy-Dashboard-input').upload(
{ fileContent: fileContent, fileName: fileName, mimeType: 'text/plain' }
)
})
cy.get('.uppy-StatusBar-actions > button').click()
......@@ -216,9 +210,8 @@ describe('Upload page negative tests', () => {
{ fileName: 'txt2.txt', fileContent: txtFile, mimeType: 'text/plain' },
{ fileName: 'txt3.txt', fileContent: txtFile, mimeType: 'text/plain' }
]
cy.get('.uppy-Dashboard-dropFilesTitle').upload(
files,
{ subjectType: 'drag-n-drop' }
cy.get('.uppy-Dashboard-input').upload(
files
)
})
cy.get('.uppy-StatusBar-actions > button').click()
......
......@@ -45,9 +45,8 @@ describe('Upload page tests', () => {
}).as('fileUpload')
cy.fixture(fileName).then(fileContent => {
cy.get('.uppy-Dashboard-dropFilesTitle').upload(
{ fileContent, fileName, mimeType: 'image/png' },
{ subjectType: 'drag-n-drop' }
cy.get('.uppy-Dashboard-input').upload(
{ fileContent, fileName, mimeType: 'image/png' }
)
})
......@@ -72,9 +71,8 @@ describe('Upload page tests', () => {
const fileName = 'not-supported.json'
cy.fixture(fileName).then(fileContent => {
cy.get('.uppy-Dashboard-dropFilesTitle').upload(
{ fileContent, fileName, mimeType: 'application/json' },
{ subjectType: 'drag-n-drop' }
cy.get('.uppy-Dashboard-input').upload(
{ fileContent, fileName, mimeType: 'application/json' }
)
})
cy.wait(300)
......@@ -96,10 +94,7 @@ describe('Upload page tests', () => {
{ fileName: 'txt9.txt', fileContent: txtFile, mimeType: 'text/plain' },
{ fileName: 'txt10.txt', fileContent: txtFile, mimeType: 'text/plain' },
]
cy.get('.uppy-Dashboard-dropFilesTitle').upload(
files,
{ subjectType: 'drag-n-drop' }
)
cy.get('.uppy-Dashboard-input').upload(files)
})
cy.wait(300)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment