Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Percent character bug #237

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/react-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"tsc": "tsc"
},
"dependencies": {
"domain-functions": "^2.0.0",
"domain-functions": "^2.5.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.38.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-1-14/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@remix-run/node": "1.14.1",
"@remix-run/react": "1.14.1",
"cross-env": "^7.0.3",
"domain-functions": "^2.0.0",
"domain-functions": "^2.5.1",
"isbot": "latest",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-1-15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@remix-run/node": "1.15.0",
"@remix-run/react": "1.15.0",
"@remix-run/serve": "1.15.0",
"domain-functions": "^2.0.0",
"domain-functions": "^2.5.1",
"isbot": "^3.6.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@remix-run/serve": "1.7.4",
"@tailwindcss/forms": "^0.4.0",
"cross-env": "^7.0.3",
"domain-functions": "^2.0.0",
"domain-functions": "^2.5.1",
"highlight.js": "^11.4.0",
"lodash": "^4.17.21",
"netlify-cli": "^10.7.1",
Expand Down
44 changes: 44 additions & 0 deletions apps/web/tests/examples/actions/with-percent-character.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { test, testWithoutJS, expect } from 'tests/setup/tests'

const route = '/examples/actions/without-redirect'

test('With JS enabled', async ({ example }) => {
const { firstName, email, button, page } = example

await page.goto(route)

// Render
await example.expectField(firstName)
await example.expectField(email)

await firstName.input.fill('John%')
await example.expectValid(firstName)

await email.input.fill('john@doe.com')
await example.expectValid(email)

// Submit form
button.click()
await expect(button).toBeDisabled()
await example.expectData({ firstName: 'John%', email: 'john@doe.com' })
})

testWithoutJS('With JS disabled', async ({ example }) => {
const { firstName, email, button, page } = example

await page.goto(route)

// Render
await example.expectField(firstName)
await example.expectField(email)

await firstName.input.fill('John%')
await example.expectValid(firstName)

await email.input.fill('john@doe.com')
await example.expectValid(email)

// Submit form
button.click()
await example.expectData({ firstName: 'John%', email: 'john@doe.com' })
})
19 changes: 8 additions & 11 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/remix-forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"test": "vitest run"
},
"peerDependencies": {
"domain-functions": "2.x",
"domain-functions": "^2.5.1",
"react": ">=16.8",
"react-hook-form": ">=7.27",
"zod": ">=3.12"
Expand Down