Skip to content

Commit

Permalink
test: test
Browse files Browse the repository at this point in the history
  • Loading branch information
abdurrahman-ledger committed Jan 7, 2025
1 parent 7c3c7f0 commit e9bf6c5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/ledger-live-mobile/e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@ let portCounter = BASE_PORT; // Counter for generating unique ports
const speculosDevices: [number, SpeculosDevice][] = [];

export async function waitForElementById(id: string | RegExp, timeout: number = DEFAULT_TIMEOUT) {
return await waitFor(getElementById(id)).toBeVisible().withTimeout(timeout);
return await waitFor(element(by.id(id)))
.toBeVisible()
.withTimeout(timeout);
}

export async function waitForElementByText(
text: string | RegExp,
timeout: number = DEFAULT_TIMEOUT,
) {
return await waitFor(getElementByText(text)).toBeVisible().withTimeout(timeout);
return await waitFor(element(by.text(text)))
.toBeVisible()
.withTimeout(timeout);
}

export function getElementById(id: string | RegExp, index = 0) {
Expand Down

0 comments on commit e9bf6c5

Please sign in to comment.