Skip to content

Commit c5ac2de

Browse files
committed
add test for wallet section on settinsg page
1 parent 4b436cb commit c5ac2de

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

e2e/specs/stateless/settings.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ test.describe('Select Primary Name', () => {
125125
login,
126126
makeName,
127127
makePageObject,
128+
accounts,
128129
}) => {
129130
test.slow()
130131

@@ -141,6 +142,7 @@ test.describe('Select Primary Name', () => {
141142
const settingsPage = makePageObject('SettingsPage')
142143
const selectPrimaryNameModal = makePageObject('SelectPrimaryNameModal')
143144
await settingsPage.goto()
145+
await expect(settingsPage.walletAddress).toHaveText(new RegExp(accounts.getAddress('user')))
144146
await settingsPage.choosePrimaryNameButton.click()
145147
await selectPrimaryNameModal.waitForPageLoad()
146148
const nameWithoutSuffix = name.slice(0, -4)

playwright/pageObjects/settingsPage.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ export class SettingsPage {
1010

1111
readonly choosePrimaryNameButton: Locator
1212

13+
readonly walletAddress: Locator
14+
1315
constructor(page: Page) {
1416
this.page = page
1517
this.changePrimaryNameButton = this.page.getByTestId('change-primary-name-button')
1618
this.removePrimaryNameButton = this.page.getByTestId('remove-primary-name-button')
1719
this.choosePrimaryNameButton = this.page.getByTestId('set-primary-name-button')
20+
this.walletAddress = this.page.getByTestId('name-details-address-address')
1821
}
1922

2023
async goto() {

0 commit comments

Comments
 (0)