Skip to content
Merged
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
16 changes: 12 additions & 4 deletions e2e/pages/wallet/AccountListBottomSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,17 @@ class AccountListBottomSheet {
return Matchers.getElementByID(CellComponentSelectorsIDs.MULTISELECT, index);
}

getSelectWithMenuElement(index) {
/**
* Retrieves the title/name of an element using the `cellbase-avatar-title` ID.
* Note: The `select-with-menu` ID element seems to never receive the tap event,
* so this method fetches the title/name instead.
*
* @param {number} index - The index of the element to retrieve.
* @returns {Detox.IndexableNativeElement} The matcher for the element's title/name.
*/
getSelectWithMenuElementName(index) {
return Matchers.getElementByID(
CellComponentSelectorsIDs.SELECT_WITH_MENU,
CellComponentSelectorsIDs.BASE_TITLE,
index,
);
}
Expand All @@ -85,11 +93,11 @@ class AccountListBottomSheet {
}

async tapToSelectActiveAccountAtIndex(index) {
await Gestures.tap(this.getSelectWithMenuElement(index));
await Gestures.tap(this.getSelectWithMenuElementName(index));
}

async longPressAccountAtIndex(index) {
await Gestures.tapAndLongPress(this.getSelectWithMenuElement(index));
await Gestures.tapAndLongPress(this.getSelectWithMenuElementName(index));
}

async tapAddAccountButton() {
Expand Down
Loading