Commit 80c3760 1 parent 7d9098d commit 80c3760 Copy full SHA for 80c3760
File tree 2 files changed +36
-1
lines changed
module-trading/src/components/general/AccountSheet/__tests__
2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -1297,7 +1297,7 @@ export const en = {
1297
1297
accountEmpty : {
1298
1298
viewOnly : {
1299
1299
title : 'No account found' ,
1300
- description : 'You need to connect your device to add new account' ,
1300
+ description : 'You need to connect your device to add new account. ' ,
1301
1301
} ,
1302
1302
networkNotEnabled : {
1303
1303
title : 'No account found' ,
Original file line number Diff line number Diff line change
1
+ import { renderWithStore , waitFor } from '@suite-native/test-utils' ;
2
+
3
+ import { NoAccountsComponent } from '../NoAccountsComponent' ;
4
+
5
+ describe ( 'NoAccountsComponent' , ( ) => {
6
+ const renderNoAccountsComponent = async ( { isConnected } : { isConnected : boolean } ) => {
7
+ const result = renderWithStore ( < NoAccountsComponent isBottomRounded /> , {
8
+ preloadedState : {
9
+ device : {
10
+ selectedDevice : {
11
+ remember : true ,
12
+ connected : isConnected ,
13
+ } ,
14
+ } ,
15
+ } ,
16
+ } ) ;
17
+ await waitFor ( ( ) => expect ( result . getByText ( 'No account found' ) ) . toBeDefined ( ) ) ;
18
+
19
+ return result ;
20
+ } ;
21
+
22
+ it ( 'should render for not connected device' , async ( ) => {
23
+ const { queryByText } = await renderNoAccountsComponent ( { isConnected : false } ) ;
24
+
25
+ expect ( queryByText ( 'You need to connect your device to add new account.' ) ) . toBeDefined ( ) ;
26
+ } ) ;
27
+
28
+ it ( 'should render for no account but connected device' , async ( ) => {
29
+ const { queryByText } = await renderNoAccountsComponent ( { isConnected : true } ) ;
30
+
31
+ expect (
32
+ queryByText ( "It seems that you don't have any account matching selected asset." ) ,
33
+ ) . toBeDefined ( ) ;
34
+ } ) ;
35
+ } ) ;
You can’t perform that action at this time.
0 commit comments