-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨(frontend) enhance document interaction tests
- Updated test cases to improve accessibility by replacing 'more_vert' with 'more_horiz' for action buttons across various components. - Refactored document deletion confirmation messages to use consistent heading roles for better visibility. - Simplified keyboard interactions in document table content tests for improved clarity. - Adjusted visibility checks for the share button to utilize more descriptive labels. - Cleaned up test code for maintainability and consistency.
- Loading branch information
1 parent
b490c07
commit 15f1d05
Showing
7 changed files
with
31 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,7 +94,13 @@ test.describe('Doc Header', () => { | |
.click(); | ||
|
||
await expect( | ||
page.locator('h2').getByText(`Deleting the document "${randomDoc}"`), | ||
page.getByRole('heading', { name: 'Delete a doc' }), | ||
).toBeVisible(); | ||
|
||
await expect( | ||
page.getByText( | ||
`Are you sure you want to delete the document "${randomDoc}"?`, | ||
), | ||
).toBeVisible(); | ||
|
||
await page | ||
|
@@ -167,7 +173,7 @@ test.describe('Doc Header', () => { | |
).toBeVisible(); | ||
await expect(invitationCard.getByLabel('doc-role-dropdown')).toBeVisible(); | ||
|
||
await invitationCard.getByRole('button', { name: 'more_vert' }).click(); | ||
await invitationCard.getByRole('button', { name: 'more_horiz' }).click(); | ||
|
||
await expect( | ||
page.getByRole('button', { | ||
|
@@ -183,9 +189,9 @@ test.describe('Doc Header', () => { | |
).toBeVisible(); | ||
await expect(memberCard.getByLabel('doc-role-dropdown')).toBeVisible(); | ||
await expect( | ||
memberCard.getByRole('button', { name: 'more_vert' }), | ||
memberCard.getByRole('button', { name: 'more_horiz' }), | ||
).toBeVisible(); | ||
await memberCard.getByRole('button', { name: 'more_vert' }).click(); | ||
await memberCard.getByRole('button', { name: 'more_horiz' }).click(); | ||
|
||
await expect( | ||
page.getByRole('button', { | ||
|
@@ -245,14 +251,14 @@ test.describe('Doc Header', () => { | |
).toBeVisible(); | ||
await expect(invitationCard.getByLabel('doc-role-text')).toBeVisible(); | ||
await expect( | ||
invitationCard.getByRole('button', { name: 'more_vert' }), | ||
invitationCard.getByRole('button', { name: 'more_horiz' }), | ||
).toBeHidden(); | ||
|
||
const memberCard = shareModal.getByLabel('List members card'); | ||
await expect(memberCard.getByText('[email protected]')).toBeVisible(); | ||
await expect(memberCard.getByLabel('doc-role-text')).toBeVisible(); | ||
await expect( | ||
memberCard.getByRole('button', { name: 'more_vert' }), | ||
memberCard.getByRole('button', { name: 'more_horiz' }), | ||
).toBeHidden(); | ||
}); | ||
|
||
|
@@ -307,14 +313,14 @@ test.describe('Doc Header', () => { | |
).toBeVisible(); | ||
await expect(invitationCard.getByLabel('doc-role-text')).toBeVisible(); | ||
await expect( | ||
invitationCard.getByRole('button', { name: 'more_vert' }), | ||
invitationCard.getByRole('button', { name: 'more_horiz' }), | ||
).toBeHidden(); | ||
|
||
const memberCard = shareModal.getByLabel('List members card'); | ||
await expect(memberCard.getByText('[email protected]')).toBeVisible(); | ||
await expect(memberCard.getByLabel('doc-role-text')).toBeVisible(); | ||
await expect( | ||
memberCard.getByRole('button', { name: 'more_vert' }), | ||
memberCard.getByRole('button', { name: 'more_horiz' }), | ||
).toBeHidden(); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters