-
Notifications
You must be signed in to change notification settings - Fork 176
add more e2e for route handlers in app-router #780
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
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks a lot for that
| formData.append("name", "OpenNext [] () %&#!%$#"); | ||
| formData.append("email", "[email protected]"); | ||
| const postRes = await request.post("/methods/post/formdata", { | ||
| form: formData, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Posting a FormData doesn't work for Cloudflare, posting an object is fine (as in the cookies test). Wondering why it works here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm updating Playwright fixes this
This introduces more general E2E for all the different route handlers available. Let me know if I should include anything more in this PR.
It will test:
GET,POST,PUT,PATCH,DELETE,HEAD, andOPTIONS)POSTroute handlerGETroute handlerGETroute withforce-staticReference: https://nextjs.org/docs/app/building-your-application/routing/route-handlers
btw, i had to turn off this in
biome.jsonc: https://biomejs.dev/linter/rules/use-literal-keys as it was not happy with usingheaders["allow"]or similar.