Skip to content

Commit

Permalink
More wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Murderlon committed Jan 4, 2022
1 parent b5283da commit c2f2c8f
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 61 deletions.
9 changes: 9 additions & 0 deletions .parcelrc
@@ -0,0 +1,9 @@
{
"extends": "@parcel/config-default",
"transformers": {
"*.{js,mjs,jsx,cjs,ts,tsx}": [
"@parcel/transformer-js",
"@parcel/transformer-react-refresh-wrap"
]
}
}
13 changes: 0 additions & 13 deletions cypress/app/dashboard/index.html

This file was deleted.

4 changes: 0 additions & 4 deletions cypress/app/dashboard/main.js

This file was deleted.

13 changes: 0 additions & 13 deletions cypress/app/index.html

This file was deleted.

4 changes: 0 additions & 4 deletions cypress/app/main.js

This file was deleted.

5 changes: 4 additions & 1 deletion cypress/parcel/app.js → cypress/clients/dashboard/app.js
@@ -1,7 +1,10 @@
import { Uppy } from '@uppy/core'
import Dashboard from '@uppy/dashboard'
import Tus from '@uppy/tus'

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

new Uppy().use(Dashboard, { target: '#app', inline: true })
new Uppy()
.use(Dashboard, { target: '#app', inline: true })
.use(Tus, { endpoint: 'https://tusd.tusdemo.net' })
File renamed without changes.
12 changes: 12 additions & 0 deletions cypress/clients/index.html
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>My First Parcel App</title>
</head>
<body>
<h1>Hello, World!</h1>
<a href="dashboard/index.html">dashboard</a>
<div id="app"></div>
</body>
</html>
2 changes: 1 addition & 1 deletion cypress/cypress.json
@@ -1,3 +1,3 @@
{
"baseUrl": "http://localhost:5000"
"baseUrl": "http://localhost:1234"
}
6 changes: 0 additions & 6 deletions cypress/cypress/integration/test.spec.js

This file was deleted.

7 changes: 7 additions & 0 deletions cypress/cypress/integration/tus.spec.js
@@ -0,0 +1,7 @@
describe('Dashboard', () => {
it('should work', async () => {
cy.visit('/dashboard')
const input = await cy.get('.uppy-Dashboard-input')
await input.setValue(path.join(__dirname, '../../resources/image.jpg'))
})
})
6 changes: 6 additions & 0 deletions cypress/generate-test.mjs
@@ -0,0 +1,6 @@
// 1. name of the test
// 2. packages to test
// 3. generate:
// - test file with visit(name)
// - index.html
// - main.js with package imports
9 changes: 4 additions & 5 deletions cypress/package.json
Expand Up @@ -4,15 +4,14 @@
"author": "Merlijn Vos <merlijn@soverin.net>",
"description": "End-to-end test suite for Uppy",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview"
"client:start": "parcel clients/index.html",
"cypress:open": "cypress open"
},
"dependencies": {
"@uppy/core": "workspace:^",
"@uppy/dashboard": "workspace:^",
"@uppy/tus": "workspace:^",
"cypress": "^9.0.0",
"parcel": "^2.0.1",
"vite": "^2.6.14"
"parcel": "^2.0.1"
}
}
14 changes: 0 additions & 14 deletions cypress/vite.config.js

This file was deleted.

3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -148,6 +148,9 @@
"size": "echo 'JS Bundle mingz:' && cat ./packages/uppy/dist/uppy.min.js | gzip | wc -c && echo 'CSS Bundle mingz:' && cat ./packages/uppy/dist/uppy.min.css | gzip | wc -c",
"start:companion": "bash ./bin/companion",
"start": "npm-run-all --parallel watch start:companion web:start",
"e2e": "npm-run-all --parallel watch:js:lib e2e:client e2e:cypress",
"e2e:client": "yarn workspace cypress client:start",
"e2e:cypress": "yarn workspace cypress cypress:open",
"test:companion": "yarn workspace @uppy/companion test",
"test:endtoend:local": "yarn workspace @uppy-tests/end2end test:endtoend:local",
"test:endtoend": "yarn workspace @uppy-tests/end2end test:endtoend",
Expand Down

0 comments on commit c2f2c8f

Please sign in to comment.