diff --git a/walletservices/demo-wallet-services-page/WalletServicesPage.ts b/walletservices/demo-wallet-services-page/WalletServicesPage.ts index 167b5b3..a772c79 100644 --- a/walletservices/demo-wallet-services-page/WalletServicesPage.ts +++ b/walletservices/demo-wallet-services-page/WalletServicesPage.ts @@ -505,6 +505,17 @@ export class WalletServicesPage { .textContent() ).toContain(balance); } + + async switchChain(browser: Browser) { + await this.page + .locator(`xpath=.//button[text()='Switch Chain 0xaa36a7']`) + .click(); + await delay(5000); + const pages = await browser.contexts()[0].pages(); + await pages[1].bringToFront(); + await pages[1].locator(`xpath=.//button[text()='Confirm']`).click(); + await delay(3000); + } async verifyWalletInDemoApp(address: string) { await this.page.locator(`xpath=.//button[text()='Show Wallet']`).click(); await delay(5000); diff --git a/walletservices/demo-wallet-services-page/index.test.ts b/walletservices/demo-wallet-services-page/index.test.ts index 3b9af85..3d302cb 100644 --- a/walletservices/demo-wallet-services-page/index.test.ts +++ b/walletservices/demo-wallet-services-page/index.test.ts @@ -81,8 +81,9 @@ test.describe.serial("Wallet Services Scenarios @demo", () => { await accountsPage.verifyUserInfoInDemoApp( "kelg8.j5s90ldb0b35@inbox.testmail.app" ); + await accountsPage.switchChain(browser); await accountsPage.verifyAddressInDemoApp("0x0dB...d4e49F"); - await accountsPage.verifyBalanceInDemoApp("0.199268189999349"); + await accountsPage.verifyBalanceInDemoApp("0.635632785708915"); await accountsPage.verifyWalletInDemoApp("0x0dBa...4e49F"); await accountsPage.verifySignedMessages("Personal Sign", browser); await accountsPage.verifySignedMessages("ETH Sign", browser);