Skip to content

Commit

Permalink
QA - smoke test fixes (#2168)
Browse files Browse the repository at this point in the history
  • Loading branch information
eunjisong authored Dec 19, 2024
1 parent ef2f918 commit 9d369d9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
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)
})
})

0 comments on commit 9d369d9

Please sign in to comment.