From bc40ac1915e75d2f4fcb6b28e4ba113b620552f0 Mon Sep 17 00:00:00 2001 From: Caleb Cox Date: Thu, 5 Sep 2024 14:41:56 -0500 Subject: [PATCH] fixup! Rename settingUp to onSetupTour --- .../settings/integrations/index.page.test.tsx | 1 + .../settings/notifications.page.test.tsx | 1 + .../settings/preferences.page.test.tsx | 1 + src/components/Setup/SetupProvider.test.tsx | 21 ++++++++++++++++--- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/pages/accountLists/[accountListId]/settings/integrations/index.page.test.tsx b/pages/accountLists/[accountListId]/settings/integrations/index.page.test.tsx index c12f4854cd..613fbd7f5f 100644 --- a/pages/accountLists/[accountListId]/settings/integrations/index.page.test.tsx +++ b/pages/accountLists/[accountListId]/settings/integrations/index.page.test.tsx @@ -22,6 +22,7 @@ const push = jest.fn(); const router = { query: { accountListId }, + pathname: '/accountLists/[accountListId]/settings/integrations', isReady: true, push, }; diff --git a/pages/accountLists/[accountListId]/settings/notifications.page.test.tsx b/pages/accountLists/[accountListId]/settings/notifications.page.test.tsx index 9dc078d7c4..a8e8bf8a09 100644 --- a/pages/accountLists/[accountListId]/settings/notifications.page.test.tsx +++ b/pages/accountLists/[accountListId]/settings/notifications.page.test.tsx @@ -23,6 +23,7 @@ const push = jest.fn(); const router = { query: { accountListId }, + pathname: '/accountLists/[accountListId]/settings/notifications', isReady: true, push, }; diff --git a/pages/accountLists/[accountListId]/settings/preferences.page.test.tsx b/pages/accountLists/[accountListId]/settings/preferences.page.test.tsx index a993ff16f4..cc888ef1b9 100644 --- a/pages/accountLists/[accountListId]/settings/preferences.page.test.tsx +++ b/pages/accountLists/[accountListId]/settings/preferences.page.test.tsx @@ -27,6 +27,7 @@ const push = jest.fn(); const router = { query: { accountListId }, + pathname: '/accountLists/[accountListId]/settings/preferences', isReady: true, push, }; diff --git a/src/components/Setup/SetupProvider.test.tsx b/src/components/Setup/SetupProvider.test.tsx index 041ae61100..4a91997a51 100644 --- a/src/components/Setup/SetupProvider.test.tsx +++ b/src/components/Setup/SetupProvider.test.tsx @@ -107,11 +107,12 @@ describe('SetupProvider', () => { expect(getByTestId('setting-up')).toHaveTextContent('undefined'); }); - it('is true when setup is set', async () => { + it('is true when setup is set on a tour page', async () => { const { getByTestId } = render( , ); @@ -120,9 +121,13 @@ describe('SetupProvider', () => { ); }); - it('is true when setup_position is set', async () => { + it('is true when setup_position is set on a tour page', async () => { const { getByTestId } = render( - , + , ); await waitFor(() => @@ -130,6 +135,16 @@ describe('SetupProvider', () => { ); }); + it('is true when not on a tour page', async () => { + const { getByTestId } = render( + , + ); + + await waitFor(() => + expect(getByTestId('setting-up')).toHaveTextContent('false'), + ); + }); + it('is false when setup_position is not set', async () => { const { getByTestId } = render( ,