Skip to content

Commit 5e480eb

Browse files
committed
build: fixed toast and snackbar tests
1 parent 99c9612 commit 5e480eb

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

packages/ui/makeup-snackbar-dialog/test/index.spec.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ test.describe("given a snackbar dialog", function () {
1212

1313
test("should have proper ARIA role and live region attributes", async ({ page }) => {
1414
const dialog = page.locator(".snackbar-dialog");
15+
const dialogContainer = dialog.locator("..");
1516

16-
// Snackbars typically use role="alert" or role="status"
1717
await expect(dialog).toHaveAttribute("role", "dialog");
18-
19-
// Should have aria-live attribute for accessibility
20-
await expect(dialog).toHaveAttribute("aria-live", "polite");
18+
await expect(dialogContainer).toHaveAttribute("role", "status");
2119
});
2220

2321
test("should have the correct position on screen", async ({ page }) => {

packages/ui/makeup-toast-dialog/test/index.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ test.describe("given a toast dialog", function () {
3939

4040
test("should have proper ARIA attributes", async ({ page }) => {
4141
const dialog = page.locator(".toast-dialog");
42+
const dialogContainer = dialog.locator("..");
4243

44+
await expect(dialogContainer).toHaveAttribute("role", "status");
4345
await expect(dialog).toHaveAttribute("role", "dialog");
44-
await expect(dialog).toHaveAttribute("aria-live", "polite");
4546
await expect(dialog).toHaveAttribute("aria-modal", "false");
4647
await expect(dialog).toHaveAttribute("aria-label", "Notification");
4748
});

0 commit comments

Comments
 (0)