From 764da8affc7b8c7999c993382f7e21ff65987b1d Mon Sep 17 00:00:00 2001 From: zhx Date: Fri, 12 Jun 2026 01:27:33 +0800 Subject: [PATCH] Clarify robot account language label --- src/features/games/pages/GameRobotPage.jsx | 6 +++--- src/features/games/pages/GameRobotPage.test.jsx | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/features/games/pages/GameRobotPage.jsx b/src/features/games/pages/GameRobotPage.jsx index 9c8f2ca..784c7bf 100644 --- a/src/features/games/pages/GameRobotPage.jsx +++ b/src/features/games/pages/GameRobotPage.jsx @@ -274,13 +274,13 @@ function GenerateDialog({ form, loading, open, setForm, onClose, onSubmit }) { onChange={(event) => setForm({ ...form, count: event.target.value })} /> setForm({ ...form, nicknameLanguage: event.target.value })} > - 阿拉伯语名称 - 英语名称 + 阿拉伯语账号 + 英语账号 diff --git a/src/features/games/pages/GameRobotPage.test.jsx b/src/features/games/pages/GameRobotPage.test.jsx index 4f2a815..464e9ab 100644 --- a/src/features/games/pages/GameRobotPage.test.jsx +++ b/src/features/games/pages/GameRobotPage.test.jsx @@ -33,7 +33,7 @@ test("renders game robot page without crashing", async () => { await waitFor(() => expect(screen.getByText("机器人用户")).toBeInTheDocument()); }); -test("shows nickname language selector when generating robots", async () => { +test("shows account language selector when generating robots", async () => { const user = userEvent.setup(); render( @@ -46,10 +46,10 @@ test("shows nickname language selector when generating robots", async () => { await waitFor(() => expect(screen.getByText("机器人用户")).toBeInTheDocument()); await user.click(screen.getByRole("button", { name: "批量创建" })); - expect(screen.getByLabelText("昵称语言")).toBeInTheDocument(); - await user.click(screen.getByRole("combobox", { name: "昵称语言" })); - expect(screen.getByRole("option", { name: "阿拉伯语名称" })).toBeInTheDocument(); - expect(screen.getByRole("option", { name: "英语名称" })).toBeInTheDocument(); + expect(screen.getByLabelText("账号语言")).toBeInTheDocument(); + await user.click(screen.getByRole("combobox", { name: "账号语言" })); + expect(screen.getByRole("option", { name: "阿拉伯语账号" })).toBeInTheDocument(); + expect(screen.getByRole("option", { name: "英语账号" })).toBeInTheDocument(); }); function jsonResponse(body) {