feat: expand intelligent investigation workspace
This commit is contained in:
@@ -50,6 +50,24 @@ describe("MapDevPanel", () => {
|
||||
expect(onFollowChange).toHaveBeenCalledWith(false);
|
||||
});
|
||||
|
||||
it("keeps map inputs when switching between investigation and map tools", async () => {
|
||||
const user = userEvent.setup();
|
||||
const commands = createCommands();
|
||||
render(<MapDevPanel commands={commands} controllerState={createControllerState()}
|
||||
detailFeature={null} onClose={vi.fn()} onInvestigationFollowChange={vi.fn()} />);
|
||||
expect(screen.getByRole("tab", { name: "调查测试" })).toHaveAttribute("aria-selected", "true");
|
||||
expect(screen.queryByRole("button", { name: "定位并高亮" })).not.toBeInTheDocument();
|
||||
await user.click(screen.getByRole("tab", { name: "地图调试" }));
|
||||
const featureId = screen.getByLabelText("要素 ID(可多个)");
|
||||
await user.clear(featureId);
|
||||
await user.type(featureId, "DEMO-PIPE-03");
|
||||
await user.click(screen.getByRole("tab", { name: "调查测试" }));
|
||||
expect(screen.queryByRole("button", { name: "重置地图调试效果" })).not.toBeInTheDocument();
|
||||
await user.click(screen.getByRole("tab", { name: "地图调试" }));
|
||||
expect(screen.getByLabelText("要素 ID(可多个)")).toHaveValue("DEMO-PIPE-03");
|
||||
expect(commands.resetAll).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("updates a pipe with its signed velocity", async () => {
|
||||
const user = userEvent.setup();
|
||||
const commands = createCommands();
|
||||
|
||||
Reference in New Issue
Block a user