-
Notifications
You must be signed in to change notification settings - Fork 1
feat(dapp): Set display name test #929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 3 commits
2b8c529
94437a6
a1b192e
98411f8
08bc33e
3f71ca5
eded71b
4570edd
8651035
f87bbd7
bce8e58
db44d12
d043109
51dfcbb
bf1bf56
02d5885
50796d1
f679121
cb901ed
ce66d1f
3b33aeb
304fbe8
76b0952
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 }) => { | ||||||
|
|
@@ -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`; | ||||||
|
|
||||||
| 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(); | ||||||
|
||||||
| const nameCard = page.getByTestId('name-card').first(); | |
| const nameCard = page.getByTestId("name-card").filter({ hasText: normalizeName(name, "at") })``` |
Outdated
There was a problem hiding this comment.
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
| // "Set as Display name" lives in a clickable panel (div), not a button |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.