Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 2 additions & 4 deletions src/wallets/keplr/actions/get-account-address.keplr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
}
Expand All @@ -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;
}