diff --git a/integration/form-test.ts b/integration/form-test.ts index 8cf32e56ec1..d5ef979598d 100644 --- a/integration/form-test.ts +++ b/integration/form-test.ts @@ -1064,3 +1064,61 @@ test.describe("Forms", () => { }); } }); + +test.describe("Forms in an app with custom routes", () => { + let fixture: Fixture; + let appFixture: AppFixture; + + test.beforeAll(async () => { + fixture = await createFixture({ + files: { + "remix.config.js": js` + module.exports = { + routes(defineRoutes) { + return defineRoutes((defineRoute) => { + defineRoute("form-custom-route", "routes/form-custom-route/_route.jsx", () => { + defineRoute("", "routes/form-custom-route.index/_route.jsx", { index: true }); + }); + }); + }, + }; + `, + "app/routes/form-custom-route/_route.jsx": js` + import { Form, Outlet } from "@remix-run/react" + export default function FormCustomRoute() { + return ( + <> +
+