From df87b78a1c77881c761618221c67a900ae8ba6af Mon Sep 17 00:00:00 2001 From: vinayaktorus Date: Sat, 26 Oct 2024 12:42:52 +0530 Subject: [PATCH] checked in changes based on the recent development --- .../demo-wallet-service/DemoWalletServicesPage.ts | 4 ++-- walletservices/demo-wallet-service/index.test.ts | 4 ++-- walletservices/utils/index.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/walletservices/demo-wallet-service/DemoWalletServicesPage.ts b/walletservices/demo-wallet-service/DemoWalletServicesPage.ts index 5d07812..a8c0f7b 100644 --- a/walletservices/demo-wallet-service/DemoWalletServicesPage.ts +++ b/walletservices/demo-wallet-service/DemoWalletServicesPage.ts @@ -314,8 +314,8 @@ export class DemoWalletServicesPage { await delay(5000); const frame = this.page.frameLocator(this.walletIframe); expect(await frame?.locator(`xpath=.//span[text()='${address}']`).first().textContent()).toContain(address); - expect(await frame?.locator(`xpath=.//p[contains(@class,'wallet:ml-2')][contains(text(),'Send')]`).last().isVisible()).toBeTruthy(); - expect(await frame?.locator(`xpath=.//p[contains(@class,'wallet:ml-2')][contains(text(),'Receive')]`).last().isVisible()).toBeTruthy(); + expect(await frame?.locator(`xpath=.//button//p[text()='Send']`).last().isVisible()).toBeTruthy(); + expect(await frame?.locator(`xpath=.//button//p[text()='Receive']`).last().isVisible()).toBeTruthy(); expect(await frame?.locator(`xpath=.//button/img[contains(@src,'eth')]`).last().isVisible()).toBeTruthy(); await frame?.locator(`xpath=.//button[contains(@class,'absolute right-1')]`).first().click(); } diff --git a/walletservices/demo-wallet-service/index.test.ts b/walletservices/demo-wallet-service/index.test.ts index eb0f347..cacd781 100644 --- a/walletservices/demo-wallet-service/index.test.ts +++ b/walletservices/demo-wallet-service/index.test.ts @@ -8,12 +8,12 @@ const demoWalletServiceLoginURL = "https://demo-wallet.web3auth.io"; const testEmail = "kelg8.j5s90ldb0b35@inbox.testmail.app"; const currentTimestamp = Math.floor(Date.now() / 1000); const address = "0x0dB...d4e49F"; -const walletAddress = "0x0dBa...4e49F"; +const walletAddress = "0x0dBa...d4e49F"; const signAddress = "0x0dBa2cE4784849FA4e42936cA0c5d8bC1Cd4e49F"; const expectedBalance = "0.635632785708915"; let sessionId: string = ""; test.describe.serial("Demo Wallet Services Scenarios @demo", () => { - test.skip(`Verify demo wallet services functionalities using passwordless login`, async ({ page, browser }) => { + test(`Verify demo wallet services functionalities using passwordless login`, async ({ page, browser }) => { test.setTimeout(3 * 60000); // adding more time to compensate high loading time test.slow() does not help in this case const demoWalletServicesPage = new DemoWalletServicesPage(page); await page.goto(demoWalletServiceLoginURL); diff --git a/walletservices/utils/index.ts b/walletservices/utils/index.ts index 7946d7e..4044cc8 100644 --- a/walletservices/utils/index.ts +++ b/walletservices/utils/index.ts @@ -509,7 +509,7 @@ async function signInWithEmailWithTestEmailApp(page: Page, email: string, browse const inbox = await res.data; const otp = inbox.emails[0].subject.match(/\d+/)[0]; console.info(otp); - await pages[0].locator(`xpath=.//input[@data-test='single-input'][@class='otp-input']`).first().type(otp); + await pages[0].locator(`xpath=.//input[@type='text']`).first().type(otp); useAutoCancel2FASetup(pages[0]); return true; } catch (err) { @@ -541,7 +541,7 @@ async function signInWithEmailWithTestEmailAppInDemoApp( const inbox = await res.data; const href = inbox.emails[0].subject.match(/\d+/)[0]; console.error(href); - await pages[1].locator(`xpath=.//input[@data-test='single-input'][@class='otp-input']`).first().type(href); + await pages[1].locator(`xpath=.//input[@type='text']`).first().type(href); useAutoCancel2FASetup(pages[1]); return true; } catch (err) { @@ -571,7 +571,7 @@ async function signInWithEmailWithTestEmailAppInCoreWalletServicesApp( const inbox = await res.data; const href = inbox.emails[0].subject.match(/\d+/)[0]; console.error(href); - await pages[1].locator(`xpath=.//input[@data-test='single-input'][@class='otp-input']`).first().type(href); + await pages[1].locator(`xpath=.//input[@type='text']`).first().type(href); useAutoCancel2FASetup(pages[1]); return true; } catch (err) {