Skip to content

Commit

Permalink
Merge pull request #416 from Web3Auth/demo_wallet
Browse files Browse the repository at this point in the history
Demo wallet
  • Loading branch information
vinayaktorus authored Oct 26, 2024
2 parents e14d671 + e493260 commit 686d6d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions walletservices/demo-wallet-service/DemoWalletServicesPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions walletservices/demo-wallet-service/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions walletservices/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 686d6d3

Please sign in to comment.