Skip to content

Commit

Permalink
Merge pull request #8120 from LedgerHQ/support/fix-dapp-test
Browse files Browse the repository at this point in the history
test: fix missing expect on dapp test
  • Loading branch information
Justkant authored Oct 17, 2024
2 parents 917c122 + 442ef28 commit b1ac76b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions apps/ledger-live-desktop/tests/specs/services/dapp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test.describe("Metamask Test Dapp", () => {
process.env.MOCK_REMOTE_LIVE_MANIFEST = dummyLiveApp;
});

test("Wallet API methods @smoke", async ({ page, electronApp }) => {
test("Dapp Browser methods @smoke", async ({ page, electronApp }) => {
const discoverPage = new DiscoverPage(page);
const drawer = new Drawer(page);
const modal = new Modal(page);
Expand All @@ -34,15 +34,19 @@ test.describe("Metamask Test Dapp", () => {
// Checks that we support EIP 6963
await webview.click("#provider > button");

webview.getByText("Name: Ledger Live");
webview.getByText("Network: 1");
webview.getByText("ChainId: 0x1");
webview.getByText("Accounts: 0x6EB963EFD0FEF7A4CFAB6CE6F1421C3279D11707");
await expect(webview.getByText("Name: Ledger Live")).toBeVisible();
await expect(webview.getByText("Network: 1")).toBeVisible();
await expect(webview.getByText("ChainId: 0x1")).toBeVisible();
await expect(
webview.getByText("Accounts: 0x6EB963EFD0FEF7A4CFAB6CE6F1421C3279D11707"),
).toBeVisible();

// Checks that getAccounts returns the correct account
await webview.click("#getAccounts");

webview.getByText("eth_accounts result: 0x6EB963EFD0FEF7A4CFAB6CE6F1421C3279D11707");
await expect(
webview.getByText("eth_accounts result: 0x6EB963EFD0FEF7A4CFAB6CE6F1421C3279D11707"),
).toBeVisible();

// Checks that personalSign works
await webview.click("#personalSign");
Expand Down

0 comments on commit b1ac76b

Please sign in to comment.