Skip to content

Commit 557c288

Browse files
committed
Fix failing CI
1 parent 3b70ea9 commit 557c288

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

tests/e2e/petra/wallet/switch-account.petra.spec.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,12 @@ import { accountSelectors } from "@/wallets/petra/selectors/homepage-selectors.p
55
const test = testWithPetraFixture;
66

77
test("Should switch account successfully", async ({ petra, petraPage }) => {
8-
const ACCOUNT_NAME = "Non whitelisted account";
8+
const ACCOUNT_NAME = "Echo";
99

1010
await petra.switchAccount(ACCOUNT_NAME);
1111

1212
const accountMenuButton = petraPage.locator(accountSelectors.accountOptionsMenuButton).first();
13-
const accountMenutButtonText = (await accountMenuButton.textContent())
14-
?.split("Switch wallet")[1]
15-
?.split("0x")[0]
16-
?.split("...")[0]
17-
?.trim()
18-
.toLowerCase();
13+
const accountMenutButtonText = (await accountMenuButton.textContent())?.split("Switch wallet")[1]?.split("0x")[0];
1914

20-
expect(accountMenutButtonText).not.toBe("");
21-
// biome-ignore lint/style/noNonNullAssertion: it shouldn't be undefined
22-
expect(ACCOUNT_NAME.toLowerCase().trim().startsWith(accountMenutButtonText!)).toBe(true);
15+
expect(accountMenutButtonText?.toLowerCase().trim()).toContain(ACCOUNT_NAME.toLowerCase().trim());
2316
});

0 commit comments

Comments
 (0)