Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA - fix smoke test regression #2128

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading