Skip to content

Commit

Permalink
Merge branch 'main' into fix-claim
Browse files Browse the repository at this point in the history
  • Loading branch information
atn4z7 authored Nov 26, 2024
2 parents af8152e + 389ce0b commit 327c8f1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core-mobile/e2e/helpers/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export enum WebScripts {
.getAttribute('uri');
}`,
CLICK_WC_CORE = `(element) => {
element.shadowRoot.querySelector('wui-flex > wui-card > w3m-router')
element.shadowRoot.querySelector('w3m-router')
.shadowRoot.querySelector('w3m-connect-view')
.shadowRoot.querySelector('wui-list-wallet[name="Core"]').click();
}`,
Expand Down
7 changes: 7 additions & 0 deletions packages/core-mobile/e2e/pages/accountManage.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import accountManage from '../locators/accountManage.loc'
import { Platform } from '../helpers/constants'
import Assert from '../helpers/assertions'
import commonElsLoc from '../locators/commonEls.loc'
import delay from '../helpers/waits'

class AccountManagePage {
get account() {
Expand Down Expand Up @@ -116,15 +117,20 @@ class AccountManagePage {
async createNthAccountAndSwitchToNth(account: number) {
await this.tapAccountDropdownTitle()
await this.tapAddEditAccounts()
await device.disableSynchronization()
await delay(1000)
for (let i = 1; i < account; i++) {
await this.tapAddAccountButton()
await delay(1000)
}
await this.tapNthAccount(account)
await this.tapDoneButton()
await device.enableSynchronization()
}

async tapNthAccount(account: number) {
try {
await Action.waitForElementNoSync(by.text(`Account ${account}`))
await Action.tap(by.text(`Account ${account}`))
} catch (e) {
console.log('Unable to tap Nth account')
Expand Down Expand Up @@ -185,6 +191,7 @@ class AccountManagePage {
}

async tapAddAccountButton() {
await Action.waitForElementNoSync(this.addAccountButton)
await Action.tapElementAtIndex(this.addAccountButton, 0)
}

Expand Down
3 changes: 2 additions & 1 deletion packages/core-mobile/e2e/pages/browser.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class BrowserPage {
}

async tapCoreConnectWallet() {
await Wbs.tapByText('Connect Wallet')
await Wbs.tapByText('Connect')
await Wbs.tapByXpath('//div[@data-testid="connect-core-mobile"]')
}

async connectTermAndContinue() {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-mobile/e2e/pages/connectToSite.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ConnectToSite {
}

async selectAccountAndconnect() {
await Action.waitForElement(this.selectAccounts, 18000)
await Action.waitForElement(this.selectAccounts, 25000)
await this.tapSelectAccounts()
await this.tapAccountCheckBox()
await this.tapApproveBtn()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ describe('Dapp - Core', () => {
await wbs.waitForEleByTextToBeVisible('Error:')
console.log('Unable to load `core.app` website')
} catch (e) {
await device.disableSynchronization()
await browserPage.tapAccept()
await browserPage.tapCoreConnectWallet()
await browserPage.tapConnectWallet()
await browserPage.connectTermAndContinue()
await browserPage.connectCore()
await device.enableSynchronization()
await connectToSitePage.selectAccountAndconnect()
await securityAndPrivacyPage.goToConnectedSites()
await connectedSitesPage.verifyDapp('Core')
Expand Down

0 comments on commit 327c8f1

Please sign in to comment.