@@ -3,6 +3,7 @@ import { actions } from '../helpers/actions'
33import { selectors } from '../helpers/selectors'
44import commonEls from '../locators/commonEls.loc'
55import portfolioPage from './portfolio.page'
6+ import settingsPage from './settings.page'
67
78class CommonElsPage {
89 get retryBtn ( ) {
@@ -407,6 +408,13 @@ class CommonElsPage {
407408 }
408409
409410 async dismissBottomSheet ( element = this . grabber ) {
411+ await actions . delay ( 1000 )
412+ const backBtn =
413+ ! ( await actions . getVisible ( element ) ) &&
414+ ( await actions . getVisible ( this . backButton ) )
415+ if ( backBtn ) {
416+ await actions . tap ( this . backButton )
417+ }
410418 await actions . waitFor ( element , 30000 )
411419 await actions . dragAndDrop ( element , [ 0 , 1500 ] )
412420 await actions . delay ( 1000 )
@@ -518,9 +526,12 @@ class CommonElsPage {
518526 await actions . waitForDisplayed ( this . copied )
519527 }
520528
521- async switchAccount ( account = commonEls . secondAccount ) {
529+ async switchAccount (
530+ account = commonEls . secondAccount ,
531+ walletName = 'Wallet 1'
532+ ) {
522533 await this . goMyWallets ( )
523- await actions . tap ( selectors . getById ( `manage_accounts_list__ ${ account } ` ) )
534+ await settingsPage . tapAccount ( account , walletName )
524535 }
525536
526537 async goMyWallets ( ) {
0 commit comments