-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ameerul /P2PS-721 Move the registration to the My Profile tab on the …
…website to ensure consistency across Mobile App and Website (#8915) * chore: moved verification to my profile when user is not registered * chore: added test case for verification * chore: fixed failing tests * chore: added check if user has poi_status when they are not an advertiser to remove loading * chore: fixed failing my-profile test * chore: changed verfication default from my_ads to my_profile * fix: verification import * fix: failing test cases
- Loading branch information
1 parent
ad3d38f
commit 15d930b
Showing
6 changed files
with
60 additions
and
124 deletions.
There are no files selected for viewing
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
104 changes: 0 additions & 104 deletions
104
.../p2p/src/components/my-profile/payment-methods/add-payment-method/add-payment-method.scss
This file was deleted.
Oops, something went wrong.
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
44 changes: 44 additions & 0 deletions
44
packages/p2p/src/pages/my-profile/__tests__/my-profile.spec.js
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,44 @@ | ||
import React from 'react'; | ||
import { screen, render } from '@testing-library/react'; | ||
import MyProfile from '../my-profile'; | ||
|
||
const mock_store = { | ||
general_store: { | ||
advertiser_info: { | ||
buy_completion_rate: 100, | ||
buy_orders_amount: 1, | ||
buy_orders_count: 1, | ||
buy_time_avg: 80, | ||
partner_count: 1, | ||
}, | ||
is_advertiser: false, | ||
should_show_dp2p_blocked: false, | ||
setActiveIndex: jest.fn(), | ||
}, | ||
my_profile_store: { | ||
error_message: '', | ||
getSettings: jest.fn(), | ||
setActiveTab: jest.fn(), | ||
setShouldShowAddPaymentMethodForm: jest.fn(), | ||
}, | ||
}; | ||
|
||
jest.mock('Stores', () => ({ | ||
...jest.requireActual('Stores'), | ||
useStores: jest.fn(() => mock_store), | ||
})); | ||
|
||
jest.mock('Components/verification', () => jest.fn(() => <div>Verification</div>)); | ||
jest.mock('../my-profile-content.jsx', () => jest.fn(() => <div>MyProfileContent</div>)); | ||
jest.mock('../my-profile-stats/my-profile-details-container', () => | ||
jest.fn(() => <div>MyProfileDetailsContainer</div>) | ||
); | ||
jest.mock('../my-profile-header', () => jest.fn(() => <div>MyProfileHeader</div>)); | ||
|
||
describe('<MyProfile />', () => { | ||
it('should show the verification page if is_advertiser is false', () => { | ||
render(<MyProfile />); | ||
|
||
expect(screen.getByText('Verification')).toBeInTheDocument(); | ||
}); | ||
}); |
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