diff --git a/resources/js/Pages/testing.jsx b/resources/js/Pages/testing.jsx index 1a3c253d..e97b4bfb 100644 --- a/resources/js/Pages/testing.jsx +++ b/resources/js/Pages/testing.jsx @@ -1,4 +1,4 @@ -import { A, Code, CodeBlock, H1, H2, P } from '@/Components' +import { A, Code, CodeBlock, H1, H2, H3, P } from '@/Components' import dedent from 'dedent-js' export const meta = { @@ -230,6 +230,25 @@ export default function () { ); `} /> +

Testing Partial Reloads

+

+ You may use the reloadOnly and reloadExcept methods to test how your application responds to partial reloads.{' '} + These methods perform a follow-up request and allow you to make assertions against the response. +

+ assertInertia(fn (Assert $page) => $page + ->has('orders') + ->missing('statuses') + ->reloadOnly('statuses', fn (Assert $reload) => $reload + ->missing('orders') + ->has('statuses', 5) + ) + ); + `} + /> +

Instead of passing a single prop as a string, you may also pass an array of props to reloadOnly or reloadExcept.

) }