feat(webui): unify icons and refine interaction feedback (#6074)
* feat(webui): unify product icons and refine interaction feedback * test(webui): align layout and tooltip expectations with icon refresh * test(webui): verify temporary chat uses shared icon controls * fix(webui): toggle workspace access directly and restore send arrow * fix(webui): keep the send control circular * fix(webui): clear workspace toggle background on pointer leave * test(webui): isolate GitHub navigation in star prompt tests * test(webui): prevent external default navigation during star link clicks
This commit is contained in:
1 parent
9dc0abae4f
commit
63bdd40280
59 files changed
+615
-505
No files matched your search
@@ -29,6 +29,11 @@ async function enter() {
|
||||
await act(async () => { await Promise.resolve(); });
|
||||
}
|
||||
|
||||
async function clickStarLink(link: HTMLElement) {
|
||||
link.addEventListener("click", (event) => event.preventDefault(), { once: true });
|
||||
await act(async () => fireEvent.click(link));
|
||||
}
|
||||
|
||||
it("claims once on entry and lets users skip without permanently dismissing", async () => {
|
||||
const view = render(<StarPrompt ready />);
|
||||
await enter();
|
||||
@@ -95,7 +100,7 @@ it("the About link opens GitHub and persists permanent dismissal", async () => {
|
||||
const link = screen.getByRole("link", { name: "Star nanobot on GitHub" });
|
||||
expect(link).toHaveAttribute("href", "https://github.com/HKUDS/nanobot");
|
||||
expect(link).toHaveAttribute("target", "_blank");
|
||||
await act(async () => fireEvent.click(link));
|
||||
await clickStarLink(link);
|
||||
expect(action).toHaveBeenCalledWith(client, "dismiss");
|
||||
});
|
||||
|
||||
@@ -167,10 +172,10 @@ it("keeps the GitHub action a real link and retries failed preference saves", as
|
||||
expect(link).toHaveAttribute("target", "_blank");
|
||||
expect(link.querySelector(".star-prompt-decoration")).toHaveAttribute("aria-hidden", "true");
|
||||
action.mockRejectedValueOnce(new Error("offline"));
|
||||
await act(async () => fireEvent.click(link));
|
||||
await clickStarLink(link);
|
||||
expect(screen.getByRole("alert")).toBeVisible();
|
||||
expect(screen.getByRole("dialog")).toBeVisible();
|
||||
await act(async () => fireEvent.click(link));
|
||||
await clickStarLink(link);
|
||||
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
|
||||
expect(action.mock.calls.map(([, command]) => command)).toEqual(["claim", "dismiss", "dismiss"]);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user