Skip to content

Commit

Permalink
add AWS Multipart files
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Apr 28, 2022
1 parent a0b9e42 commit 1c31365
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
16 changes: 16 additions & 0 deletions e2e/clients/dashboard-aws-multipart/app.js
@@ -0,0 +1,16 @@
import { Uppy } from '@uppy/core'
import Dashboard from '@uppy/dashboard'
import AwsS3 from '@uppy/aws-s3-multipart'

import '@uppy/core/dist/style.css'
import '@uppy/dashboard/dist/style.css'

const uppy = new Uppy()
.use(Dashboard, { target: '#app', inline: true })
.use(AwsS3, {
limit: 2,
companionUrl: process.env.VITE_COMPANION_URL,
})

// Keep this here to access uppy in tests
window.uppy = uppy
11 changes: 11 additions & 0 deletions e2e/clients/dashboard-aws-multipart/index.html
@@ -0,0 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>dashboard-aws-multipart</title>
<script defer type="module" src="app.js"></script>
</head>
<body>
<div id="app"></div>
</body>
</html>
1 change: 1 addition & 0 deletions e2e/clients/index.html
Expand Up @@ -9,6 +9,7 @@ <h1>Test apps</h1>
<nav>
<ul>
<li><a href="dashboard-aws/index.html">dashboard-aws</a></li>
<li><a href="dashboard-aws-multipart/index.html">dashboard-aws-multipart</a></li>
<li><a href="dashboard-compressor/index.html">dashboard-compressor</a></li>
<li><a href="dashboard-react/index.html">dashboard-react</a></li>
<li><a href="dashboard-transloadit/index.html">dashboard-transloadit</a></li>
Expand Down
13 changes: 13 additions & 0 deletions e2e/cypress/integration/dashboard-aws-multipart.spec.ts
@@ -0,0 +1,13 @@
describe('dashboard-aws', () => {
beforeEach(() => {
cy.visit('/dashboard-aws')
cy.get('.uppy-Dashboard-input').as('file-input')
})

it('should upload cat image successfully', () => {
cy.get('@file-input').attachFile('images/cat.jpg')
cy.get('.uppy-StatusBar-actionBtn--upload').click()

cy.get('.uppy-StatusBar-statusPrimary').should('contain', 'Complete')
})
})

0 comments on commit 1c31365

Please sign in to comment.