Skip to content

Commit ab2bbd4

Browse files
authored
test: trim UI and tooling test seams (#126937)
1 parent 8bc6ab0 commit ab2bbd4

6 files changed

Lines changed: 2 additions & 44 deletions

‎scripts/e2e/telegram-desktop-recorder.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ eval "$(xdotool getwindowgeometry --shell "$win")"
178178
printf '%s %s %s %s\n' "$X" "$Y" "$WIDTH" "$HEIGHT"`;
179179
}
180180

181-
export function renderHideTelegramWindow(): string {
181+
function renderHideTelegramWindow(): string {
182182
return `set -euo pipefail
183183
export DISPLAY=:99
184184
win="$(wmctrl -lx | awk 'tolower($0) ~ /telegramdesktop/ {print $1; exit}')"

‎test/scripts/mantis-telegram-desktop-proof-workflow.test.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ describe("Mantis Telegram Desktop proof workflow", () => {
350350
);
351351
expect(workflowText).toContain("dispatcherSources.has(inputs.request_source)");
352352
expect(workflowText).toContain('requestSource === "clawsweeper_label"');
353-
expect(workflowText).toContain("pr.head.repo.full_name !== `${owner}/${repo}`");
354353
expect(workflowText).toContain("allow-bot-users: github-actions[bot]");
355354
expect(workflowText).not.toContain("allow-bot-users: github-actions[bot],clawsweeper[bot]");
356355
expect(workflowText).toContain("inputs.approved_head_sha !== candidateRevision");
@@ -462,7 +461,6 @@ describe("Mantis Telegram Desktop proof workflow", () => {
462461
expect(workflow.on?.workflow_dispatch?.inputs?.publish_artifact_name?.required).toBe(false);
463462
expect(workflow.on?.workflow_dispatch?.inputs?.publish_run_id?.required).toBe(false);
464463
expect(captureJob?.if).toContain("needs.resolve_request.outputs.publish_artifact_name == ''");
465-
expect(captureJob?.if).toContain("needs.resolve_request.outputs.visibility_decision != 'skip'");
466464
expect(workflow.jobs?.validate_refs).toBeUndefined();
467465
expect(publishJob?.if).toBe(
468466
"needs.resolve_request.outputs.should_run == 'true' && needs.resolve_request.outputs.publish_artifact_name != ''",
@@ -1071,7 +1069,6 @@ describe("Mantis Telegram Desktop proof workflow", () => {
10711069
expect(prompt).toContain("start --repo-root <prepared-root>");
10721070
expect(prompt).toContain("MANTIS_BASELINE_ROOT");
10731071
expect(prompt).toContain("MANTIS_CANDIDATE_ROOT");
1074-
expect(prompt).not.toContain("--sut-container");
10751072
expect(prompt).toContain('--baseline-repo-root "$GITHUB_WORKSPACE"');
10761073
expect(prompt).toContain('--candidate-repo-root "$GITHUB_WORKSPACE"');
10771074
expect(workflow).toContain(
@@ -1089,7 +1086,6 @@ describe("Mantis Telegram Desktop proof workflow", () => {
10891086
expect(workflow).toContain('"$runtime_parent/attestations/$lane.json"');
10901087
const attestationValidation =
10911088
workflowStep("Restore and validate trusted lane evidence").run ?? "";
1092-
expect(attestationValidation).toContain('[[ "$lane_status" != "skipped" ]]');
10931089
expect(attestationValidation).not.toContain('if [[ "$lane_status" == "skipped"');
10941090
expect(attestationValidation.indexOf(".comparison[$lane].sha == $sha")).toBeLessThan(
10951091
attestationValidation.indexOf('"$runtime_parent/attestations/$lane.json"'),

‎test/scripts/telegram-desktop-recorder.test.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
type RecorderOperations,
1818
type RecorderSession,
1919
renderGoldenImagePreflight,
20-
renderHideTelegramWindow,
2120
renderLaunchDesktop,
2221
renderPrepareQr,
2322
renderReadQrLink,
@@ -555,7 +554,6 @@ describe("Telegram Desktop recorder remote contract", () => {
555554
expect(openIndex).toBeGreaterThanOrEqual(0);
556555
expect(hideIndex).toBeGreaterThan(openIndex);
557556
expect(captureIndex).toBeGreaterThan(hideIndex);
558-
expect(renderHideTelegramWindow()).toContain('xdotool windowminimize "$win"');
559557
});
560558

561559
it("fetches the undecodable login screen when login attempts run out", async () => {

‎ui/src/app/lazy-shell-action.test.ts‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from "./app-host.test-support.ts";
1313
import "./app-host.ts";
1414
import { DEBUG_OVERLAY_ELEMENT } from "./lazy-custom-element.ts";
15-
import { persistLazyShellAction, readLazyShellAction } from "./lazy-shell-action.ts";
15+
import { readLazyShellAction } from "./lazy-shell-action.ts";
1616

1717
const storageKey = "openclaw:lazy-event";
1818

@@ -33,18 +33,6 @@ async function withConnectedShell(shell: ShellLifecycle, run: () => void | Promi
3333
afterEach(resetAppHostTestGlobals);
3434

3535
describe("lazy shell action storage", () => {
36-
it("round-trips a closed structured panel action", () => {
37-
const storage = createStorageMock();
38-
const action = {
39-
eventType: TERMINAL_PANEL_TOGGLE_EVENT,
40-
detail: { dock: "right", open: true },
41-
} as const;
42-
vi.stubGlobal("sessionStorage", storage);
43-
44-
persistLazyShellAction(action);
45-
expect(readLazyShellAction()).toEqual(action);
46-
});
47-
4836
it.each([
4937
"{",
5038
JSON.stringify({ eventType: COMMAND_PALETTE_OPEN_EVENT, extra: true }),

‎ui/src/components/app-sidebar.lineage-freshness.test.ts‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,12 @@ describe("sidebar routed-lineage freshness", () => {
7676
},
7777
),
7878
);
79-
harness.reconcile.mockClear();
8079
harness.publishList({ result: result(offline) });
8180

8281
expect(sidebar.sessionData.activeSessionLineageSelectedRow).toMatchObject({
8382
placement: { runner: { kind: "device", status: "offline" } },
8483
derivedTitle: "My device session",
8584
lastMessagePreview: "Most recent message",
8685
});
87-
await waitForFast(() =>
88-
expect(harness.reconcile).toHaveBeenCalledWith(
89-
expect.objectContaining({
90-
placement: expect.objectContaining({ runner: { kind: "device", status: "offline" } }),
91-
}),
92-
result(offline).defaults,
93-
{
94-
archivedFilter: "all",
95-
sourceCanonicalListRevision: harness.sessions.canonicalListRevision,
96-
},
97-
),
98-
);
9986
});
10087
});

‎ui/src/lib/sessions/index-supplemental-reconcile.test.ts‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ describe("supplemental session reconciliation", () => {
114114
const sessions = capabilityWithList(sessionsResult([canonical], 10));
115115
const sourceCanonicalListRevision = sessions.canonicalListRevision;
116116
await sessions.refresh({ force: true });
117-
const reconcile = vi.spyOn(sessions, "reconcile");
118117
const cached = {
119118
...canonical,
120119
updatedAt: 20,
@@ -141,11 +140,6 @@ describe("supplemental session reconciliation", () => {
141140
sourceCanonicalListRevision,
142141
);
143142

144-
expect(reconcile).toHaveBeenCalledWith(
145-
expect.objectContaining({ placement: placement("offline") }),
146-
sessions.state.result?.defaults,
147-
{ archivedFilter: "all", sourceCanonicalListRevision },
148-
);
149143
expect(sessions.state.result?.sessions[0]?.placement).toEqual(placement("offline"));
150144
expect(owner.activeSessionLineageSelectedRow).toMatchObject({
151145
placement: placement("offline"),
@@ -159,7 +153,6 @@ describe("supplemental session reconciliation", () => {
159153
const sessions = capabilityWithList(sessionsResult([], 10));
160154
const sourceCanonicalListRevision = sessions.canonicalListRevision;
161155
await sessions.refresh({ force: true });
162-
const reconcile = vi.spyOn(sessions, "reconcile");
163156
const archived = {
164157
key: "agent:main:archived-routed",
165158
kind: "direct" as const,
@@ -182,10 +175,6 @@ describe("supplemental session reconciliation", () => {
182175
sourceCanonicalListRevision,
183176
);
184177

185-
expect(reconcile).toHaveBeenCalledWith(archived, sessions.state.result?.defaults, {
186-
archivedFilter: "all",
187-
sourceCanonicalListRevision,
188-
});
189178
expect(sessions.state.result?.sessions).toEqual([archived]);
190179
sessions.dispose();
191180
});

0 commit comments

Comments
 (0)