Skip to content

Commit

Permalink
chore: Add future flags to custom routes.tsx in tests (#3016)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshabarov authored Dec 16, 2024
1 parent 6fc330a commit d2e84ca
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,18 @@ export const routes: ViewRouteObject[] = [
},
];

const router = createBrowserRouter([...routes]);
const router = createBrowserRouter([...routes], {
future: {
// eslint-disable-next-line camelcase
v7_fetcherPersist: true,
// eslint-disable-next-line camelcase
v7_normalizeFormMethod: true,
// eslint-disable-next-line camelcase
v7_partialHydration: true,
// eslint-disable-next-line camelcase
v7_relativeSplatPath: true,
// eslint-disable-next-line camelcase
v7_skipActionErrorRevalidation: true,
},
});
export default router;
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,18 @@ export const routes: ViewRouteObject[] = [
},
];

const router = createBrowserRouter([...routes]);
const router = createBrowserRouter([...routes], {
future: {
// eslint-disable-next-line camelcase
v7_fetcherPersist: true,
// eslint-disable-next-line camelcase
v7_normalizeFormMethod: true,
// eslint-disable-next-line camelcase
v7_partialHydration: true,
// eslint-disable-next-line camelcase
v7_relativeSplatPath: true,
// eslint-disable-next-line camelcase
v7_skipActionErrorRevalidation: true,
},
});
export default router;
15 changes: 14 additions & 1 deletion packages/java/tests/spring/native/frontend/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,17 @@ export const routes: RouteObject[] = [
{ path: '/login', element: <LoginView /> }
];

export default createBrowserRouter(routes);
export default createBrowserRouter(routes, {
future: {
// eslint-disable-next-line camelcase
v7_fetcherPersist: true,
// eslint-disable-next-line camelcase
v7_normalizeFormMethod: true,
// eslint-disable-next-line camelcase
v7_partialHydration: true,
// eslint-disable-next-line camelcase
v7_relativeSplatPath: true,
// eslint-disable-next-line camelcase
v7_skipActionErrorRevalidation: true,
},
});
15 changes: 14 additions & 1 deletion packages/java/tests/spring/react-grid-test/frontend/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,18 @@ export const routes = [
},
];

const router = createBrowserRouter([...routes]);
const router = createBrowserRouter([...routes], {
future: {
// eslint-disable-next-line camelcase
v7_fetcherPersist: true,
// eslint-disable-next-line camelcase
v7_normalizeFormMethod: true,
// eslint-disable-next-line camelcase
v7_partialHydration: true,
// eslint-disable-next-line camelcase
v7_relativeSplatPath: true,
// eslint-disable-next-line camelcase
v7_skipActionErrorRevalidation: true,
},
});
export default router;
15 changes: 14 additions & 1 deletion packages/java/tests/spring/react-i18n/frontend/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,18 @@ export const routes = [
},
];

const router = createBrowserRouter([...routes]);
const router = createBrowserRouter([...routes], {
future: {
// eslint-disable-next-line camelcase
v7_fetcherPersist: true,
// eslint-disable-next-line camelcase
v7_normalizeFormMethod: true,
// eslint-disable-next-line camelcase
v7_partialHydration: true,
// eslint-disable-next-line camelcase
v7_relativeSplatPath: true,
// eslint-disable-next-line camelcase
v7_skipActionErrorRevalidation: true,
},
});
export default router;

0 comments on commit d2e84ca

Please sign in to comment.