-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8bf5fff
commit 3b31fa0
Showing
3 changed files
with
102 additions
and
6 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
components/atoms/Stepper/Forms/__snapshots__/payment2.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Payment2 component renders the component without crashing 1`] = ` | ||
Object { | ||
"debug": [Function], | ||
"findAllByAltText": [Function], | ||
"findAllByDisplayValue": [Function], | ||
"findAllByLabelText": [Function], | ||
"findAllByPlaceholderText": [Function], | ||
"findAllByRole": [Function], | ||
"findAllByTestId": [Function], | ||
"findAllByText": [Function], | ||
"findAllByTitle": [Function], | ||
"findByAltText": [Function], | ||
"findByDisplayValue": [Function], | ||
"findByLabelText": [Function], | ||
"findByPlaceholderText": [Function], | ||
"findByRole": [Function], | ||
"findByTestId": [Function], | ||
"findByText": [Function], | ||
"findByTitle": [Function], | ||
"getAllByAltText": [Function], | ||
"getAllByDisplayValue": [Function], | ||
"getAllByLabelText": [Function], | ||
"getAllByPlaceholderText": [Function], | ||
"getAllByRole": [Function], | ||
"getAllByTestId": [Function], | ||
"getAllByText": [Function], | ||
"getAllByTitle": [Function], | ||
"getByAltText": [Function], | ||
"getByDisplayValue": [Function], | ||
"getByLabelText": [Function], | ||
"getByPlaceholderText": [Function], | ||
"getByRole": [Function], | ||
"getByTestId": [Function], | ||
"getByText": [Function], | ||
"getByTitle": [Function], | ||
"logTestingPlaygroundURL": [Function], | ||
"queryAllByAltText": [Function], | ||
"queryAllByDisplayValue": [Function], | ||
"queryAllByLabelText": [Function], | ||
"queryAllByPlaceholderText": [Function], | ||
"queryAllByRole": [Function], | ||
"queryAllByTestId": [Function], | ||
"queryAllByText": [Function], | ||
"queryAllByTitle": [Function], | ||
"queryByAltText": [Function], | ||
"queryByDisplayValue": [Function], | ||
"queryByLabelText": [Function], | ||
"queryByPlaceholderText": [Function], | ||
"queryByRole": [Function], | ||
"queryByTestId": [Function], | ||
"queryByText": [Function], | ||
"queryByTitle": [Function], | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import '@testing-library/jest-dom'; | ||
import { render, screen, fireEvent } from '@testing-library/react'; | ||
import Payment2 from './payment2'; | ||
import { FormContext } from '../../../../pages/voucher/buy'; | ||
import { Provider } from 'react-redux'; | ||
import { store } from '../../../../redux/store'; | ||
import { SessionProvider } from 'next-auth/react'; | ||
require('jest-fetch-mock').enableMocks(); | ||
|
||
|
||
describe('Payment2 component', () => { | ||
it('renders the component without crashing', () => { | ||
|
||
fetch.mockResponse('{}'); | ||
|
||
jest.spyOn(window.localStorage.__proto__, 'getItem').mockReturnValue(JSON.stringify({ | ||
firstName: 'John', | ||
amount: 123, | ||
})); | ||
|
||
render( | ||
<SessionProvider session={{ | ||
user: { | ||
name: 'John', | ||
data: { | ||
userId: 1, | ||
} | ||
} | ||
}}> | ||
<Provider store={store}> | ||
<FormContext.Provider value={{ | ||
activeStepIndex: 0, // identity step | ||
}}> | ||
<Payment2 /> | ||
</FormContext.Provider > | ||
</Provider> | ||
</SessionProvider> | ||
); | ||
expect(screen).toMatchSnapshot(); | ||
}); | ||
}); |
3b31fa0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
wii-qare-fe – ./
wii-qare-fe-wiiqare.vercel.app
wii-qare-fe.vercel.app
wii-qare-fe-git-main-wiiqare.vercel.app