From 7cc2428ac4286bb39e8ea8c12aeedd858dc8008f Mon Sep 17 00:00:00 2001 From: Ugwuanyi TobeChukwu <39131739+amaify@users.noreply.github.com> Date: Sun, 28 Jun 2026 19:20:39 +0100 Subject: [PATCH] [Injective] - Fix flakiness in the "getAccountAddress" action --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/wallets/keplr/actions/get-account-address.keplr.ts | 6 ++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4144409..6309089 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @tobelabs/chainwright +## 0.10.9 + +### Patch Changes + +- Fix flakiness in the Injective's "get-account-address" action + ## 0.10.8 ### Patch Changes diff --git a/package.json b/package.json index 9e1a99a..da30ba9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chainwright", - "version": "0.10.8", + "version": "0.10.9", "description": "Playwright Web3 wallet testing framework for end-to-end dApp automation with MetaMask, Phantom, Solflare, Petra, Meteor, and Keplr", "type": "module", "license": "MIT", diff --git a/src/wallets/keplr/actions/get-account-address.keplr.ts b/src/wallets/keplr/actions/get-account-address.keplr.ts index 1814635..a9df450 100644 --- a/src/wallets/keplr/actions/get-account-address.keplr.ts +++ b/src/wallets/keplr/actions/get-account-address.keplr.ts @@ -18,7 +18,7 @@ export async function getAccountAddress({ page, ...args }: GetAccountAddress) { .nth(-2) .filter({ hasNot: page.locator("span") }); - await spendableAssetList.waitFor({ state: "attached", timeout: 20_000 }); + await spendableAssetList.waitFor({ state: "attached", timeout: 30_000 }); const isSpendableAssetVisible = await spendableAssetList.isVisible().catch(() => false); if (!isSpendableAssetVisible) { @@ -63,7 +63,6 @@ export async function getAccountAddress({ page, ...args }: GetAccountAddress) { // Traversing up the DOM to find the address parent element const parentChainElement = chainElement.locator("xpath=../../../.."); addressElement = parentChainElement; - await popoverSearchInput.clear(); break; } } @@ -78,8 +77,7 @@ export async function getAccountAddress({ page, ...args }: GetAccountAddress) { await addressElement.scrollIntoViewIfNeeded(); await addressElement.click(); - await addressElement.waitFor({ state: "detached", timeout: 7_000 }); - const accountAddress = await page.evaluate(async () => await navigator.clipboard.readText()); + expect(accountAddress).not.toBeFalsy(); return accountAddress; }