Skip to content

Commit 3d1918e

Browse files
committed
test: remove UI and native test residue
1 parent 7e09412 commit 3d1918e

9 files changed

Lines changed: 3 additions & 134 deletions

File tree

‎apps/ios/Tests/SwiftUIRenderSmokeTests.swift‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -714,18 +714,6 @@ struct SwiftUIRenderSmokeTests {
714714
}
715715
}
716716

717-
@Test @MainActor func `voice wake words view builds A view hierarchy`() {
718-
let appModel = NodeAppModel()
719-
let root = NavigationStack { VoiceWakeWordsSettingsView() }
720-
.environment(appModel)
721-
_ = Self.host(root)
722-
}
723-
724-
@Test @MainActor func `voice wake toast builds A view hierarchy`() {
725-
let root = VoiceWakeToast(command: "openclaw: do something")
726-
_ = Self.host(root)
727-
}
728-
729717
@MainActor private static func waitForPresentedAlert(in window: UIWindow) async {
730718
for _ in 0..<10 {
731719
if window.rootViewController?.presentedViewController != nil { return }

‎apps/macos/Tests/OpenClawIPCTests/LowCoverageViewSmokeTests.swift‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,4 @@ struct LowCoverageViewSmokeTests {
1414

1515
controller.dismiss()
1616
}
17-
18-
@Test func `talk overlay presents twice and dismisses`() async {
19-
let controller = TalkOverlayController()
20-
controller.present()
21-
controller.updateLevel(0.4)
22-
controller.present()
23-
controller.dismiss()
24-
try? await Task.sleep(nanoseconds: 250_000_000)
25-
}
2617
}

‎apps/macos/Tests/OpenClawIPCTests/SettingsViewSmokeTests.swift‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,6 @@ struct SettingsViewSmokeTests {
6060
_ = hosting.fittingSize
6161
}
6262

63-
@Test func `general settings renders the keyboard shortcut recorder`() {
64-
let state = AppState(preview: true)
65-
let hosting = NSHostingView(rootView: GeneralSettings(state: state))
66-
hosting.frame = NSRect(x: 0, y: 0, width: 760, height: 640)
67-
hosting.layoutSubtreeIfNeeded()
68-
_ = hosting.fittingSize
69-
}
70-
7163
@Test func `Gateway settings is visible`() {
7264
let tabs = SettingsTabGroup.defaultGroups(showDebug: false, showSystemAgent: false)
7365
.flatMap(\.tabs)

‎ui/src/lib/chat/commands.browser-import.test.ts‎

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎ui/src/pages/chat/components/chat-composer.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ export function renderChatComposer(props: ChatComposerProps) {
232232
};
233233
const questionPanelProps = gatewayQuestionPrompt
234234
? createGatewayQuestionPanelProps(gatewayQuestionPrompt, {
235-
nowMs: Date.now(),
236235
collapsed: state.gatewayQuestionCollapsed,
237236
onCollapsedChange: (collapsed) => {
238237
state.gatewayQuestionCollapsed = collapsed;

‎ui/src/pages/chat/components/chat-question-card.test.ts‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ describe("shared question panel", () => {
6969
render(
7070
html`<openclaw-chat-question-panel
7171
.props=${createGatewayQuestionPanelProps(prompt, {
72-
nowMs: 2_000,
7372
collapsed,
7473
onCollapsedChange: (nextCollapsed) => {
7574
collapsed = nextCollapsed;
@@ -249,7 +248,7 @@ describe("shared question panel", () => {
249248
it("disables actions whose gateway callbacks are unavailable", async () => {
250249
render(
251250
html`<openclaw-chat-question-panel
252-
.props=${createGatewayQuestionPanelProps(gatewayPrompt(), { nowMs: 2_000 })}
251+
.props=${createGatewayQuestionPanelProps(gatewayPrompt(), {})}
253252
></openclaw-chat-question-panel>`,
254253
container,
255254
);
@@ -272,7 +271,7 @@ describe("shared question panel", () => {
272271
it("manages collapse state when no controlled callback is supplied", async () => {
273272
render(
274273
html`<openclaw-chat-question-panel
275-
.props=${createGatewayQuestionPanelProps(gatewayPrompt(), { nowMs: 2_000 })}
274+
.props=${createGatewayQuestionPanelProps(gatewayPrompt(), {})}
276275
></openclaw-chat-question-panel>`,
277276
container,
278277
);
@@ -292,7 +291,6 @@ describe("shared question panel", () => {
292291
render(
293292
html`<openclaw-chat-question-panel
294293
.props=${createGatewayQuestionPanelProps(gatewayPrompt(), {
295-
nowMs: 2_000,
296294
onSubmit,
297295
})}
298296
></openclaw-chat-question-panel>`,
@@ -312,7 +310,6 @@ describe("shared question panel", () => {
312310
render(
313311
html`<openclaw-chat-question-panel
314312
.props=${createGatewayQuestionPanelProps(gatewayPrompt(), {
315-
nowMs: 2_000,
316313
onSkip,
317314
})}
318315
></openclaw-chat-question-panel>`,

‎ui/src/pages/chat/components/chat-question-card.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ type QuestionPanelProps = {
3838
};
3939

4040
type GatewayQuestionPanelOptions = {
41-
nowMs: number;
4241
onChange?: () => void;
4342
onSubmit?: (answers: Record<string, string[]>) => void | Promise<void>;
4443
onSkip?: () => void | Promise<void>;

‎ui/src/pages/chat/components/widget-card.test.ts‎

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -372,55 +372,6 @@ describe("widget-card", () => {
372372
expect(app.querySelector("[data-pin-widget]")).toBeNull();
373373
});
374374

375-
it("announces a failed Canvas dashboard pin and leaves it retryable", async () => {
376-
const pinWidget = vi.fn(async () => {
377-
throw new Error("canvas document is stale");
378-
});
379-
const provider = {
380-
sessionKey: "agent:main:main",
381-
canPinWidgets: true,
382-
pinWidget,
383-
snapshot$: {
384-
value: {
385-
sessionKey: "agent:main:main",
386-
revision: 0,
387-
tabs: [],
388-
widgets: [],
389-
},
390-
subscribe: () => () => {},
391-
},
392-
} as unknown as BoardProvider;
393-
const toastHost = document.body.appendChild(document.createElement("openclaw-toast-host"));
394-
const canvas = document.createElement("div");
395-
render(
396-
renderToolPreview(
397-
{
398-
kind: "canvas",
399-
surface: "assistant_message",
400-
render: "url",
401-
viewId: "cv_stale",
402-
url: "/__openclaw__/canvas/documents/cv_stale/index.html",
403-
sandbox: "scripts",
404-
},
405-
"chat_message",
406-
{ boardProvider: provider },
407-
),
408-
canvas,
409-
);
410-
411-
const button = canvas.querySelector<HTMLButtonElement>("[data-pin-widget]");
412-
button?.click();
413-
414-
await vi.waitFor(() => {
415-
expect(pinWidget).toHaveBeenCalledOnce();
416-
expect(button?.disabled).toBe(false);
417-
expect(toastHost.querySelector(".app-toast__message")?.textContent).toBe(
418-
"Could not pin to dashboard. Try again.",
419-
);
420-
});
421-
toastHost.remove();
422-
});
423-
424375
it("pins an MCP App using only its view identity", async () => {
425376
const pinMcpApp = vi.fn(async () => undefined);
426377
const provider = {

‎ui/src/pages/config/config-page.test.ts‎

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import {
2424
configSelectionFromSearch,
2525
extractQuickSettingsSecurity,
2626
} from "./config-page.ts";
27-
import { configSectionKeysForPage } from "./config-sections.ts";
2827
import type { ConfigViewState } from "./view.ts";
2928

3029
const switchActiveRealtimeTalkCameras =
@@ -75,14 +74,6 @@ describe("configSelectionFromSearch", () => {
7574
});
7675

7776
it("keeps MCP separate from Infrastructure", () => {
78-
expect(configSectionKeysForPage("mcp")).toEqual(["mcp"]);
79-
expect(configSectionKeysForPage("infrastructure")).toEqual([
80-
"gateway",
81-
"browser",
82-
"nodeHost",
83-
"discovery",
84-
"acp",
85-
]);
8677
expect(configSelectionFromSearch("mcp", "?section=browser")).toEqual({
8778
activeSection: "mcp",
8879
activeSubsection: null,
@@ -93,25 +84,12 @@ describe("configSelectionFromSearch", () => {
9384
});
9485
});
9586

96-
it("keeps Communications focused on messages and text-to-speech", () => {
97-
expect(configSectionKeysForPage("communications")).toEqual(["messages", "tts"]);
98-
});
99-
100-
it("gives Talk its own curated page", () => {
101-
expect(configSectionKeysForPage("talk")).toEqual(["talk"]);
102-
});
103-
104-
it("gives Updates ownership of the update config section", () => {
105-
expect(configSectionKeysForPage("updates")).toEqual(["update"]);
87+
it("keeps the Updates section off Advanced", () => {
10688
expect(configSelectionFromSearch("advanced", "?section=update")).toEqual({
10789
activeSection: null,
10890
activeSubsection: null,
10991
});
11092
});
111-
112-
it("keeps provider models off Agent Defaults", () => {
113-
expect(configSectionKeysForPage("ai-agents")).toEqual(["agents", "skills", "tools", "session"]);
114-
});
11593
});
11694

11795
describe("extractQuickSettingsSecurity", () => {

0 commit comments

Comments
 (0)