fix(webui): keep automation review stable and share complete task details
This commit is contained in:
1 parent
845afe9215
commit
c932720b20
8 files changed
+107
-23
No files matched your search
@@ -1775,9 +1775,13 @@ describe("App layout", () => {
|
||||
expect(within(screen.getByRole("dialog", { name: "Daily repo check" })).getByText("Check the repo status")).toBeVisible();
|
||||
const detail = within(screen.getByRole("dialog", { name: "Daily repo check" }));
|
||||
expect(detail.queryByText("Release prep")).not.toBeInTheDocument();
|
||||
expect(detail.getByRole("link", { name: "Open a chat" })).toHaveAttribute(
|
||||
const user = userEvent.setup();
|
||||
await user.click(detail.getByRole("button", { name: "More actions" }));
|
||||
expect(screen.getByRole("menuitem", { name: "Open a chat" })).toHaveAttribute(
|
||||
"href", "#/chat/websocket%3Achat-a",
|
||||
);
|
||||
await user.keyboard("{Escape}");
|
||||
expect(detail.getByRole("button", { name: "More actions" })).toHaveFocus();
|
||||
fireEvent.click(screen.getByRole("button", { name: "Close", exact: true }));
|
||||
expect(screen.getByText("WeChat quiz")).toBeInTheDocument();
|
||||
fireEvent.click(screen.getByRole("button", { name: /WeChat quiz/ }));
|
||||
@@ -1829,7 +1833,9 @@ describe("App layout", () => {
|
||||
const dialog = screen.getByRole("dialog", { name: "Drink water" });
|
||||
expect(within(dialog).queryByText("推特大战场")).not.toBeInTheDocument();
|
||||
expect(within(dialog).queryByText("Stored title")).not.toBeInTheDocument();
|
||||
expect(within(dialog).getByRole("link", { name: "Open a chat" })).toHaveAttribute(
|
||||
const user = userEvent.setup();
|
||||
await user.click(within(dialog).getByRole("button", { name: "More actions" }));
|
||||
expect(screen.getByRole("menuitem", { name: "Open a chat" })).toHaveAttribute(
|
||||
"href", "#/chat/websocket%3Alinked-chat",
|
||||
);
|
||||
for (const title of ["新会话名称", ""]) {
|
||||
@@ -1841,10 +1847,12 @@ describe("App layout", () => {
|
||||
const expected = title || "Stored title";
|
||||
expect(within(sidebar).getByText(expected)).toBeInTheDocument();
|
||||
expect(within(dialog).queryByText(expected)).not.toBeInTheDocument();
|
||||
expect(within(dialog).getByRole("link", { name: "Open a chat" })).toHaveAttribute(
|
||||
expect(screen.getByRole("menuitem", { name: "Open a chat" })).toHaveAttribute(
|
||||
"href", "#/chat/websocket%3Alinked-chat",
|
||||
);
|
||||
}
|
||||
await user.keyboard("{Escape}");
|
||||
expect(within(dialog).getByRole("button", { name: "More actions" })).toHaveFocus();
|
||||
expect(requestMutationSpy).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user