mirror of
https://github.com/iflytek/skillhub.git
synced 2026-09-05 08:05:56 +00:00
test(e2e): use exact text match for profile field labels
getByText('Display Name') is a substring match by default, so it also
matched the description paragraph "Manage your display name and
personal information." (strict mode violation: resolved to 2 elements).
Use { exact: true } to match the field label only.
This commit is contained in:
parent
7175063d83
commit
20b5accf6e
1 changed files with 2 additions and 2 deletions
|
|
@ -12,8 +12,8 @@ test.describe('Profile Settings (Real API)', () => {
|
|||
await page.goto('/settings/profile')
|
||||
|
||||
await expect(page.getByRole('heading', { name: 'Profile Settings' })).toBeVisible()
|
||||
await expect(page.getByText('Display Name')).toBeVisible()
|
||||
await expect(page.getByText('Email')).toBeVisible()
|
||||
await expect(page.getByText('Display Name', { exact: true })).toBeVisible()
|
||||
await expect(page.getByText('Email', { exact: true })).toBeVisible()
|
||||
})
|
||||
|
||||
test('TC_PROFILE_002: edit button toggles to save and cancel', async ({ page }) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue