dashboard-aws.spec.ts 594 B

12345678910111213141516
  1. describe('Dashboard with @uppy/aws-s3', () => {
  2. beforeEach(() => {
  3. cy.visit('/dashboard-aws')
  4. cy.get('.uppy-Dashboard-input:first').as('file-input')
  5. cy.intercept({ method: 'GET', pathname: '/s3/params' }).as('get')
  6. cy.intercept({ method: 'POST' }).as('post')
  7. })
  8. it('should upload cat image successfully', () => {
  9. cy.get('@file-input').selectFile('cypress/fixtures/images/cat.jpg', { force:true })
  10. cy.get('.uppy-StatusBar-actionBtn--upload').click()
  11. cy.wait(['@post', '@get'])
  12. cy.get('.uppy-StatusBar-statusPrimary').should('contain', 'Complete')
  13. })
  14. })