-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into p2ps-433/apply-filter-payment-method
- Loading branch information
Showing
88 changed files
with
1,715 additions
and
596 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...ore/src/assets/svgs/trading-platform/branding/ic-branding-derivez-dashboard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
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
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
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
56 changes: 56 additions & 0 deletions
56
packages/appstore/src/components/onboarding-new/__tests__/static-dashboard.spec.tsx
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 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import StaticDashboard from '../static-dashboard'; | ||
import { StoreProvider, mockStore } from '@deriv/stores'; | ||
|
||
describe('<StaticDashboard />', () => { | ||
const is_blurry = { | ||
icon: true, | ||
item: false, | ||
text: false, | ||
get: false, | ||
topup: false, | ||
trade: false, | ||
cfd_item: false, | ||
cfd_text: false, | ||
options_item: false, | ||
options_text: false, | ||
cfd_description: false, | ||
options_description: false, | ||
platformlauncher: false, | ||
}; | ||
|
||
const is_onboarding_animated = { | ||
text: false, | ||
trade: false, | ||
topup: false, | ||
button: false, | ||
get: false, | ||
}; | ||
|
||
test('should render derivez in page if !CFDs_restricted_countries (non-eu countries)', () => { | ||
const mock = mockStore({}); | ||
|
||
render( | ||
<StoreProvider store={mock}> | ||
<StaticDashboard is_blurry={is_blurry} is_onboarding_animated={is_onboarding_animated} /> | ||
</StoreProvider> | ||
); | ||
expect(screen.queryByText('Deriv EZ')).toBeInTheDocument(); | ||
}); | ||
|
||
test('should not render derivez if CFDs_restricted_countries: true (eu countries)', () => { | ||
const mock = mockStore({ | ||
traders_hub: { | ||
CFDs_restricted_countries: true, | ||
}, | ||
}); | ||
|
||
render( | ||
<StoreProvider store={mock}> | ||
<StaticDashboard is_blurry={is_blurry} is_onboarding_animated={is_onboarding_animated} /> | ||
</StoreProvider> | ||
); | ||
expect(screen.queryByText('Deriv Ez')).not.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
Oops, something went wrong.