Skip to content

Commit

Permalink
fix: update account order
Browse files Browse the repository at this point in the history
  • Loading branch information
KVNLS committed Oct 23, 2023
1 parent 0ff8452 commit 63ab62b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/tests/models/AddAccountModal.ts
Expand Up @@ -36,6 +36,7 @@ export class AddAccountModal extends Modal {
}

async getFirstAccountName() {
await this.page.waitForTimeout(500);

This comment has been minimized.

Copy link
@gre

gre Oct 27, 2023

Contributor

we really need to find a way not to rely on this approach. let's catch up later. (ctx https://ledgerhq.atlassian.net/browse/LIVE-9791 )

This comment has been minimized.

Copy link
@KVNLS

KVNLS Oct 27, 2023

Author Member

I agree, we need to assert the impact on the UI but this will require changes in how we build our UI to follow web semantics. Some elements are not accessible at all. I tried on the swap page and we can't select dropdown values easily.

const firstAccountName = await this.accountsList.locator("input").first().inputValue();
return firstAccountName;
}
Expand Down
4 changes: 4 additions & 0 deletions apps/ledger-live-desktop/tests/models/LiveAppWebview.ts
Expand Up @@ -112,6 +112,10 @@ export class LiveAppWebview {
return waitFor(() => this.textIsPresent(textToCheck));
}

async waitForLoaded() {
return this.page.waitForLoadState("domcontentloaded");
}

async textIsPresent(textToCheck: string) {
const result: boolean = await this.page.evaluate(textToCheck => {
const webview = document.querySelector("webview");
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/tests/specs/services/buy.spec.ts
Expand Up @@ -55,6 +55,7 @@ test("Buy / Sell @smoke", async ({ page }) => {

await test.step("Navigate to Buy app from portfolio banner", async () => {
await portfolioPage.startBuyFlow();
await liveAppWebview.waitForLoaded();
await expect(await liveAppWebview.waitForCorrectTextInWebview("theme: dark")).toBe(true);
await expect(await liveAppWebview.waitForCorrectTextInWebview("lang: en")).toBe(true);
await expect
Expand Down

0 comments on commit 63ab62b

Please sign in to comment.