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.5

### Patch Changes

- Fix bug in "renameAccount" action for the Meteor wallet

## 0.10.4

### 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.4",
"version": "0.10.5",
"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
1 change: 0 additions & 1 deletion src/wallets/meteor/actions/onboard.meteor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export default async function onboard({ page, network, accountName, additionalAc
const PASSWORD = await getWalletPasswordFromCache("meteor");
const meteorProfile = new MeteorProfile();
const indexUrl = await meteorProfile.indexUrl();
await page.setViewportSize({ width: 380, height: 600 });
await page.goto(indexUrl);

const switchNetworkButton = page.locator(onboardingSelectors.switchNetworkButton);
Expand Down
15 changes: 12 additions & 3 deletions src/wallets/meteor/actions/rename-account.meteor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, type Page } from "@playwright/test";
import type { Page } from "@playwright/test";
import { homepageSelectors } from "../selectors/homepage-selectors.meteor";
import type { RenameAccountArgs } from "../types";

Expand All @@ -12,10 +12,19 @@ export async function renameAccount({ page, newAccountName }: RenameAccount) {
await accountName.click();

const accountNameInput = page.locator("input[placeholder='Ex. My Meteor Wallet']");
const inputValue = await accountNameInput.inputValue();

if (inputValue.toLowerCase() === newAccountName.toLowerCase()) {
console.info(
`Can't rename account. Current account name: ${inputValue} is the same with the new account name: ${newAccountName}`,
);
const closeButton = page.locator("section[role='dialog'] > button[aria-label='Close']");
await closeButton.click();
return;
}

const updateButton = page.locator("button[type='submit']:has-text('Update')");
await accountNameInput.fill(newAccountName);

await expect(updateButton).toBeEnabled({ timeout: 30_000 });
await updateButton.click();

const closeMenuButton = page.locator("div[id='root'] button[aria-label='Close']");
Expand Down