diff --git a/src/id-verification/tests/panels/GetNameIdPanel.test.jsx b/src/id-verification/tests/panels/GetNameIdPanel.test.jsx index d26dd2c..1404888 100644 --- a/src/id-verification/tests/panels/GetNameIdPanel.test.jsx +++ b/src/id-verification/tests/panels/GetNameIdPanel.test.jsx @@ -82,6 +82,6 @@ describe('GetNameIdPanel', () => { const button = await screen.findByTestId('next-button'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/summary'); + expect(history.location.pathname).toEqual('summary'); }); }); diff --git a/src/id-verification/tests/panels/IdContextPanel.test.jsx b/src/id-verification/tests/panels/IdContextPanel.test.jsx index d32a564..a2eff2b 100644 --- a/src/id-verification/tests/panels/IdContextPanel.test.jsx +++ b/src/id-verification/tests/panels/IdContextPanel.test.jsx @@ -43,7 +43,7 @@ describe('IdContextPanel', () => { ))); const button = await screen.findByTestId('next-button'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/take-id-photo'); + expect(history.location.pathname).toEqual('take-id-photo'); }); it('routes to TakeIdPhotoPanel if reachedSummary is true', async () => { @@ -59,6 +59,6 @@ describe('IdContextPanel', () => { ))); const button = await screen.findByTestId('next-button'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/take-id-photo'); + expect(history.location.pathname).toEqual('take-id-photo'); }); }); diff --git a/src/id-verification/tests/panels/PortraitPhotoContextPanel.test.jsx b/src/id-verification/tests/panels/PortraitPhotoContextPanel.test.jsx index a43580f..6d6de91 100644 --- a/src/id-verification/tests/panels/PortraitPhotoContextPanel.test.jsx +++ b/src/id-verification/tests/panels/PortraitPhotoContextPanel.test.jsx @@ -40,7 +40,7 @@ describe('PortraitPhotoContextPanel', () => { ))); const button = await screen.findByTestId('next-button'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/take-portrait-photo'); + expect(history.location.pathname).toEqual('take-portrait-photo'); }); it('routes to TakePortraitPhotoPanel if reachedSummary is true', async () => { @@ -56,6 +56,6 @@ describe('PortraitPhotoContextPanel', () => { ))); const button = await screen.findByTestId('next-button'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/take-portrait-photo'); + expect(history.location.pathname).toEqual('take-portrait-photo'); }); }); diff --git a/src/id-verification/tests/panels/RequestCameraAccessPanel.test.jsx b/src/id-verification/tests/panels/RequestCameraAccessPanel.test.jsx index 3c9d8ba..7def78a 100644 --- a/src/id-verification/tests/panels/RequestCameraAccessPanel.test.jsx +++ b/src/id-verification/tests/panels/RequestCameraAccessPanel.test.jsx @@ -66,7 +66,7 @@ describe('RequestCameraAccessPanel', () => { expect(text).toHaveTextContent(/Looks like your camera is working and ready./); const button = await screen.findByTestId('next-button'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/portrait-photo-context'); + expect(history.location.pathname).toEqual('portrait-photo-context'); }); it('renders correctly with media access denied', async () => { @@ -215,6 +215,6 @@ describe('RequestCameraAccessPanel', () => { ))); const button = await screen.findByTestId('next-button'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/portrait-photo-context'); + expect(history.location.pathname).toEqual('portrait-photo-context'); }); }); diff --git a/src/id-verification/tests/panels/ReviewRequirementsPanel.test.jsx b/src/id-verification/tests/panels/ReviewRequirementsPanel.test.jsx index 2c7c040..4497e88 100644 --- a/src/id-verification/tests/panels/ReviewRequirementsPanel.test.jsx +++ b/src/id-verification/tests/panels/ReviewRequirementsPanel.test.jsx @@ -44,7 +44,7 @@ describe('ReviewRequirementsPanel', () => { await getPanel(); const button = await screen.findByTestId('next-button'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/request-camera-access'); + expect(history.location.pathname).toEqual('request-camera-access'); }); it('displays an alert if the user\'s account information is managed by a third party', async () => { diff --git a/src/id-verification/tests/panels/SummaryPanel.test.jsx b/src/id-verification/tests/panels/SummaryPanel.test.jsx index 84364ca..8a0c119 100644 --- a/src/id-verification/tests/panels/SummaryPanel.test.jsx +++ b/src/id-verification/tests/panels/SummaryPanel.test.jsx @@ -22,7 +22,7 @@ dataService.submitIdVerification = jest.fn().mockReturnValue({ success: true }); const IntlSummaryPanel = injectIntl(SummaryPanel); const history = createMemoryHistory(); - +console.warn(history.location) describe('SummaryPanel', () => { const defaultProps = { intl: {}, @@ -61,7 +61,7 @@ describe('SummaryPanel', () => { await getPanel(); const button = await screen.findByTestId('portrait-retake'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/take-portrait-photo'); + expect(history.location.pathname).toEqual('take-portrait-photo'); expect(history.location.state.fromSummary).toEqual(true); }); @@ -69,7 +69,8 @@ describe('SummaryPanel', () => { await getPanel(); const button = await screen.findByTestId('id-retake'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/take-id-photo'); + console.warn(history.location) + expect(history.location.pathname).toEqual('take-id-photo'); expect(history.location.state.fromSummary).toEqual(true); }); diff --git a/src/id-verification/tests/panels/TakeIdPhotoPanel.test.jsx b/src/id-verification/tests/panels/TakeIdPhotoPanel.test.jsx index 0672bff..25eabff 100644 --- a/src/id-verification/tests/panels/TakeIdPhotoPanel.test.jsx +++ b/src/id-verification/tests/panels/TakeIdPhotoPanel.test.jsx @@ -63,7 +63,7 @@ describe('TakeIdPhotoPanel', () => { const button = await screen.findByTestId('next-button'); expect(button).toBeVisible(); fireEvent.click(button); - expect(history.location.pathname).toEqual('/get-name-id'); + expect(history.location.pathname).toEqual('get-name-id'); }); it('routes back to SummaryPanel if that was the source', async () => { @@ -80,7 +80,7 @@ describe('TakeIdPhotoPanel', () => { ))); const button = await screen.findByTestId('next-button'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/summary'); + expect(history.location.pathname).toEqual('summary'); }); it('shows correct text if user should use upload', async () => { diff --git a/src/id-verification/tests/panels/TakePortraitPhotoPanel.test.jsx b/src/id-verification/tests/panels/TakePortraitPhotoPanel.test.jsx index a0f4313..e21a8bf 100644 --- a/src/id-verification/tests/panels/TakePortraitPhotoPanel.test.jsx +++ b/src/id-verification/tests/panels/TakePortraitPhotoPanel.test.jsx @@ -65,7 +65,7 @@ describe('TakePortraitPhotoPanel', () => { const button = await screen.findByTestId('next-button'); expect(button).toBeVisible(); fireEvent.click(button); - expect(history.location.pathname).toEqual('/id-context'); + expect(history.location.pathname).toEqual('id-context'); }); it('routes back to SummaryPanel if that was the source', async () => { @@ -83,6 +83,6 @@ describe('TakePortraitPhotoPanel', () => { ))); const button = await screen.findByTestId('next-button'); fireEvent.click(button); - expect(history.location.pathname).toEqual('/summary'); + expect(history.location.pathname).toEqual('summary'); }); });