Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2b8c529
feat(dapp): connect address test
KeitoTadashi Nov 17, 2025
94437a6
feat(dapp): connect address and set display test
KeitoTadashi Nov 17, 2025
a1b192e
Merge branch 'develop' into tooling-dapp/management-tests-connect-add…
KeitoTadashi Nov 18, 2025
98411f8
feat(dapp): polish
KeitoTadashi Nov 18, 2025
08bc33e
Merge branch 'develop' into tooling-dapp/management-tests-connect-add…
KeitoTadashi Nov 18, 2025
3f71ca5
Merge branch 'develop' into tooling-dapp/management-tests-connect-add…
KeitoTadashi Nov 18, 2025
eded71b
Merge branch 'develop' into tooling-dapp/management-tests-connect-add…
KeitoTadashi Nov 19, 2025
4570edd
Merge branch 'develop' into tooling-dapp/management-tests-connect-add…
KeitoTadashi Nov 21, 2025
8651035
fixes
KeitoTadashi Nov 21, 2025
f87bbd7
add timeout
KeitoTadashi Nov 21, 2025
bce8e58
Merge branch 'develop' into tooling-dapp/management-tests-connect-add…
msarcev Nov 24, 2025
db44d12
conflicts
KeitoTadashi Nov 28, 2025
d043109
lint
KeitoTadashi Nov 28, 2025
51dfcbb
add check displayed pill
KeitoTadashi Nov 28, 2025
bf1bf56
feat(dapp): polish dropdowns
KeitoTadashi Nov 25, 2025
02d5885
feat(dapp): cleanup
KeitoTadashi Nov 25, 2025
50796d1
fix comments
KeitoTadashi Nov 26, 2025
f679121
chore(dapp): Remove commented code
msarcev Nov 27, 2025
cb901ed
feat(dapp): add set avatar amplitude event (#979)
Juligs Dec 1, 2025
ce66d1f
restore create subname test
KeitoTadashi Dec 1, 2025
3b33aeb
revert
KeitoTadashi Dec 1, 2025
304fbe8
Merge branch 'develop' into tooling-dapp/management-tests-connect-add…
KeitoTadashi Dec 1, 2025
76b0952
revert
KeitoTadashi Dec 1, 2025
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
7 changes: 6 additions & 1 deletion dapp/src/components/buttons/MenuButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ type MenuButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'ref'
export const MenuButton = forwardRef<HTMLButtonElement, MenuButtonProps>(
({ variant, ...props }, ref) => {
return (
<button className={buttonVariants({ variant })} ref={ref} {...props}>
<button
className={buttonVariants({ variant })}
data-testid="menu-button"
ref={ref}
{...props}
>
<MoreHoriz className="w-5 h-5 " />
</button>
);
Expand Down
1 change: 1 addition & 0 deletions dapp/src/components/name-card/NameCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function NameCard({
className={cx(
'flex flex-col relative aspect-square rounded-xl group/display z-0 overflow-hidden w-full',
)}
data-testid="name-card-avatar"
>
{displaySrc ? (
<AvatarDisplay src={displaySrc} blur={blurImage} />
Expand Down
41 changes: 40 additions & 1 deletion dapp/tests/management/management.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// Copyright (c) 2025 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

import { Ed25519Keypair } from '@iota/iota-sdk/keypairs/ed25519';
import { formatAddress } from '@iota/iota-sdk/utils';

import { expect, test } from '../helpers/fixtures';
import { connectWallet, createWallet, requestFaucetTokens } from '../utils';
import { connectWallet, createWallet, purchaseName, requestFaucetTokens } from '../utils';

test.describe.parallel('Name Management Tests', () => {
test.beforeAll(async ({ appPage, context, extensionPage, extensionName, sharedState }) => {
Expand All @@ -23,4 +24,42 @@ test.describe.parallel('Name Management Tests', () => {
sharedState.wallet.address = address;
sharedState.wallet.mnemonic = mnemonic;
});
test('Connect Address and Set Display', async ({ appPage: page, context, sharedState }) => {
const keypair = Ed25519Keypair.deriveKeypair(sharedState.wallet.mnemonic ?? '');
const name = `e2etest-${Math.floor(Math.random() * 100)}.iota`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const name = `e2etest-${Math.floor(Math.random() * 100)}.iota`;
const name = generateRandomName('display');


const { response } = await purchaseName(name, sharedState.wallet.address ?? '', keypair);
expect(response.effects?.status.status).toBe('success');

await page.goto('/my-names');
const nameCards = page.getByTestId('name-card');
await expect(nameCards.first()).toBeVisible({ timeout: 10_000 });

const nameCard = page.getByTestId('name-card').first();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const nameCard = page.getByTestId('name-card').first();
const nameCard = page.getByTestId("name-card").filter({ hasText: normalizeName(name, "at") })```

await nameCard.getByTestId('name-card-avatar').hover();
const menuButtonLocator = nameCard.getByTestId('menu-button');
await expect(menuButtonLocator).toBeVisible();
await menuButtonLocator.click();

await page.getByText('Connect to Address', { exact: true }).click();
const dialog = page.getByRole('dialog');
await expect(dialog.getByText('Connect to Address')).toBeVisible();

await dialog.getByRole('button', { name: /use current address/i }).click();
await expect(dialog.getByText('Set as Display name')).toBeVisible();

// "Set as Display name" lives in a clickable panel (div), not a button
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this comment is not necessary

Suggested change
// "Set as Display name" lives in a clickable panel (div), not a button

await dialog.getByText('Set as Display name').click();

await dialog.getByRole('button', { name: 'Apply' }).click();
(await context.waitForEvent('page')).getByRole('button', { name: 'Approve' }).click();
await page.bringToFront();

await expect(page.getByText('Address linked successfully', { exact: false })).toBeVisible({
timeout: 30_000,
});
await dialog.getByRole('button', { name: 'Finish' }).click();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdyt about making a fetch call to check that the changes reflect on the network?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a blocker though, just a thought

await page.close();
});
});
Loading