Skip to content

Commit

Permalink
add tests with symbolic links
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 3, 2022
1 parent 9406d48 commit 43175bf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions e2e/cypress/fixtures/images/cat-symbolic-link
1 change: 1 addition & 0 deletions e2e/cypress/fixtures/images/cat-symbolic-link.jpg
16 changes: 16 additions & 0 deletions e2e/cypress/integration/dashboard-ui.spec.ts
Expand Up @@ -2,6 +2,7 @@ describe('dashboard-ui', () => {
beforeEach(() => {
cy.visit('/dashboard-ui')
cy.get('.uppy-Dashboard-input:first').as('file-input')
cy.get('.uppy-Dashboard-AddFiles').as('drop-target')
})

it('should not throw when calling uppy.close()', () => {
Expand All @@ -18,4 +19,19 @@ describe('dashboard-ui', () => {
.should('have.length', 2)
.each((element) => expect(element).attr('src').to.include('blob:'))
})

it('should support drag&drop', () => {
cy.get('@drop-target').selectFile([
'cypress/fixtures/images/cat.jpg',
'cypress/fixtures/images/cat-symbolic-link',
'cypress/fixtures/images/cat-symbolic-link.jpg',
'cypress/fixtures/images/traffic.jpg',
], { action: 'drag-drop' })

cy.get('.uppy-Dashboard-Item')
.should('have.length', 4)
cy.get('.uppy-Dashboard-Item-previewImg')
.should('have.length', 3)
.each((element) => expect(element).attr('src').to.include('blob:'))
})
})

0 comments on commit 43175bf

Please sign in to comment.