Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions tests/browser/settings.spec.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { animationsSettled } from "./animations.mjs";
import { setPluginEnabled } from "./plugin-settings.mjs";
import {
closeSettings,
Expand Down Expand Up @@ -1066,10 +1067,19 @@ test("Settings loads and publishes the selected community profile", async ({
}),
).toBeFocused();
await expect(save()).toHaveCount(0);
await expect(
page.getByRole("dialog", { name: "Profile updated" }),
).toBeVisible();
const updated = page.getByRole("dialog", { name: "Profile updated" });
await expect(updated).toBeVisible();
await expect(reopenedName).toHaveValue("Updated community profile");
// The notice lands over Close Settings, and a pointer resting on it holds
// its expiry. Dismiss it so the click below cannot arrive as it slides in.
const toast = page.locator("[data-sonner-toast]").filter({ has: updated });
await expect(toast).toHaveAttribute("data-mounted", "true");
await animationsSettled(toast, { subtree: true });
await toast.hover();
await updated
.getByRole("button", { name: "Dismiss notification", exact: true })
.click();
await expect(updated).toHaveCount(0);
// The account avatar is behind the modal; check it from the workspace. The
// pointer left on Close can briefly open a tooltip for the control beneath it.
await closeSettings(page);
Expand Down
Loading