Skip to content

Commit

Permalink
fix: get example tests running again
Browse files Browse the repository at this point in the history
I've disabled the ones that don't exist anymore, but am going to go back and reimplement them next
  • Loading branch information
travis committed Dec 6, 2023
1 parent 8f54a49 commit 9a72ce7
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/react/file-upload/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>w3ui File Upload</title>
<title>W3UI File Upload Example App</title>
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 2 additions & 1 deletion examples/react/file-upload/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "file-upload",
"name": "@w3ui/example-react-file-upload",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"start": "vite",
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
Expand Down
2 changes: 1 addition & 1 deletion examples/react/file-upload/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function AuthenticationForm() {
<div>
<Authenticator.Form>
<div>
<label htmlFor='authenticator-email'>Email</label>
<label htmlFor='authenticator-email'>Email address:</label>
<Authenticator.EmailInput id='authenticator-email' required />
</div>
<div>
Expand Down
4 changes: 4 additions & 0 deletions examples/react/file-upload/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
base: '',
plugins: [react()],
server: {
port: 3000,
}
})
4 changes: 3 additions & 1 deletion examples/test/playwright/src/file-upload.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { test, expect } from '@playwright/test'

for (const ui of ['react', 'solid'/*, 'vue' is failing to submit the form, but only in tests */ /* 'vanilla' not work atm */]) {
for (const ui of [
'react'
]) {
test(`${ui}: file upload`, async ({ page }) => {
await page.goto(`/${ui}/file-upload/`)
await expect(page).toHaveTitle('W3UI File Upload Example App')
Expand Down
3 changes: 1 addition & 2 deletions examples/test/playwright/src/multi-file-upload.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { test, expect } from '@playwright/test'

for (const ui of [
'react',
'solid' /* `vue` not exit yet, 'vanilla' not work atm */,
// 'react',
]) {
test(`${ui}: multi file upload`, async ({ page }) => {
await page.goto(`/${ui}/multi-file-upload/`)
Expand Down
4 changes: 3 additions & 1 deletion examples/test/playwright/src/sign-up-in.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { test, expect } from '@playwright/test'

for (const ui of ['react', 'solid' /*, 'vue' is failing to submit the form, but only in tests */ /* 'vanilla' not work atm */]) {
for (const ui of [
// 'react'
]) {
test(`${ui}: sign in`, async ({ page }) => {
await page.goto(`/${ui}/sign-up-in/`)
await expect(page).toHaveTitle('W3UI Sign Up / Sign In Example App')
Expand Down
4 changes: 3 additions & 1 deletion examples/test/playwright/src/uploads-list.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { test, expect } from '@playwright/test'

for (const ui of ['react', 'solid' /*, 'vue' is failing to submit the form, but only in tests */ /* 'vanilla' not work atm */]) {
for (const ui of [
// 'react'
]) {
test(`${ui}: uploads list`, async ({ page }) => {
await page.goto(`/${ui}/uploads-list/`)
await expect(page).toHaveTitle('W3UI Uploads List Example App')
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@
},
"dependencies": {
"hd-scripts": "^4.1.0"
},
"devDependencies": {
"serve": "^14.1.2"
}
}
7 changes: 5 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9a72ce7

Please sign in to comment.