File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,19 +5,12 @@ import { accountSelectors } from "@/wallets/petra/selectors/homepage-selectors.p
55const test = testWithPetraFixture ;
66
77test ( "Should switch account successfully" , async ( { petra, petraPage } ) => {
8- const ACCOUNT_NAME = "Non whitelisted account " ;
8+ const ACCOUNT_NAME = "Echo " ;
99
1010 await petra . switchAccount ( ACCOUNT_NAME ) ;
1111
1212 const accountMenuButton = petraPage . locator ( accountSelectors . accountOptionsMenuButton ) . first ( ) ;
13- const accountMenutButtonText = ( await accountMenuButton . textContent ( ) )
14- ?. split ( "Switch wallet" ) [ 1 ]
15- ?. split ( "0x" ) [ 0 ]
16- ?. split ( "..." ) [ 0 ]
17- ?. trim ( )
18- . toLowerCase ( ) ;
13+ const accountMenutButtonText = ( await accountMenuButton . textContent ( ) ) ?. split ( "Switch wallet" ) [ 1 ] ?. split ( "0x" ) [ 0 ] ;
1914
20- expect ( accountMenutButtonText ) . not . toBe ( "" ) ;
21- // biome-ignore lint/style/noNonNullAssertion: it shouldn't be undefined
22- expect ( ACCOUNT_NAME . toLowerCase ( ) . trim ( ) . startsWith ( accountMenutButtonText ! ) ) . toBe ( true ) ;
15+ expect ( accountMenutButtonText ?. toLowerCase ( ) . trim ( ) ) . toContain ( ACCOUNT_NAME . toLowerCase ( ) . trim ( ) ) ;
2316} ) ;
You can’t perform that action at this time.
0 commit comments