From 18ee8c4d254cf16aa5b5060d8231a879f8644911 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Mon, 13 Mar 2023 10:46:55 -0400 Subject: [PATCH] Update integration tests --- integration/fetcher-state-test.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/integration/fetcher-state-test.ts b/integration/fetcher-state-test.ts index 20baea5cb98..fb11e706434 100644 --- a/integration/fetcher-state-test.ts +++ b/integration/fetcher-state-test.ts @@ -80,12 +80,11 @@ test.describe("fetcher states", () => { const fetcher = useFetcher(); return ( <> - {fetcher.type === 'init' ? + {fetcher.state === 'idle' && fetcher.data == null ?
                     {
                       JSON.stringify({
                         state: fetcher.state,
-                        type: fetcher.type,
                         formMethod: fetcher.formMethod,
                         formAction: fetcher.formAction,
                         formData: fetcher.formData,
@@ -144,7 +143,11 @@ test.describe("fetcher states", () => {
     let text = (await app.getElement("#initial-state")).text();
     expect(JSON.parse(text)).toEqual({
       state: "idle",
-      type: "init",
+      data: undefined,
+      formData: undefined,
+      formAction: undefined,
+      formMethod: undefined,
+      formEncType: undefined,
     });
   });
 
@@ -189,7 +192,7 @@ test.describe("fetcher states", () => {
     let text = (await app.getElement("#states")).text();
     expect(JSON.parse(text)).toEqual([
       {
-        state: "submitting",
+        state: "loading",
         formData: { key: "value" },
         formAction: "/page",
         formMethod: "GET",