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 - smoke test fixes #2168

Merged
merged 1 commit into from
Dec 19, 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
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ type Props = {
editable?: boolean
selected?: boolean
blurred?: boolean
testID?: string
}

function AccountItem({
account,
onSelectAccount,
editable,
selected,
blurred
blurred,
testID
}: Props): JSX.Element {
const { activeNetwork } = useNetworks()
const walletType = useSelector(selectWalletType)
Expand Down Expand Up @@ -99,6 +101,7 @@ function AccountItem({
return (
<>
<AvaButton.Base
testID={testID}
onPress={() => onSelectAccount?.(account.index)}
style={[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function AccountItemRenderer({
const activeAccount = useSelector(selectActiveAccount)
return (
<AccountItem
testID={`account__${account.name}`}
key={account.name}
account={account}
editable
Expand Down
6 changes: 3 additions & 3 deletions packages/core-mobile/e2e/pages/accountManage.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ class AccountManagePage {
await delay(1000)
for (let i = 1; i < account; i++) {
await this.tapAddAccountButton()
await delay(1000)
}
await this.tapNthAccount(account)
await this.tapDoneButton()
Expand All @@ -131,7 +130,7 @@ class AccountManagePage {
async tapNthAccount(account: number) {
try {
await Action.waitForElementNoSync(by.text(`Account ${account}`))
await Action.tap(by.text(`Account ${account}`))
await Action.tap(by.id(`account__Account ${account}`))
} catch (e) {
console.log('Unable to tap Nth account')
}
Expand Down Expand Up @@ -191,8 +190,9 @@ class AccountManagePage {
}

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

async tapAddEditAccounts() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe('Add custom token', () => {
await Actions.waitForElementNotVisible(
ManageTokensPage.inputContractAddress
)
await Actions.waitForElement(ManageTokensPage.manageTokenList)
await Actions.waitForElement(ManageTokensPage.added)
await Actions.waitForElement(ManageTokensPage.addcustomToken)
})
})
Loading