Some checks failed
build-packages / resolve bundled mosh-client (push) Has been cancelled
build-packages / resolve bundled et-client (push) Has been cancelled
build-packages / build-macos (push) Has been cancelled
build-packages / build-windows (push) Has been cancelled
build-packages / build-linux-x64 (push) Has been cancelled
build-packages / build-linux-arm64 (push) Has been cancelled
build-packages / release (push) Has been cancelled
build-packages / update Nix release metadata (push) Has been cancelled
build-packages / bump homebrew tap (push) Has been cancelled
test / lint-and-test (push) Has been cancelled
AI automation / Route event (push) Has been cancelled
AI automation / Hand reopened issue to maintainers (push) Has been cancelled
AI automation / Clean source issue state (push) Has been cancelled
AI automation / Reconcile handoffs (push) Has been cancelled
AI automation / Classify issue (push) Has been cancelled
AI automation / Claude Code smoke (push) Has been cancelled
AI automation / Review issue follow-up (push) Has been cancelled
AI automation / Publish issue follow-up (push) Has been cancelled
AI automation / Implement with Claude Code (push) Has been cancelled
AI automation / Publish implement PR (push) Has been cancelled
AI automation / Continue queued issue comments (push) Has been cancelled
AI automation / Codex review loop (push) Has been cancelled
AI automation / Publish Codex fix (push) Has been cancelled
AI automation / Clear Codex dispatch marker (push) Has been cancelled
AI automation / Own PR re-request Codex (push) Has been cancelled
AI automation / External PR re-request Codex (push) Has been cancelled
AI automation / Poll Codex reaction / retry (push) Has been cancelled
build-et-binaries / build-linux-x64 (push) Has been cancelled
build-et-binaries / build-linux-arm64 (push) Has been cancelled
build-et-binaries / build-macos-universal (push) Has been cancelled
build-et-binaries / build-windows-x64 (push) Has been cancelled
build-et-binaries / release (push) Has been cancelled
46 lines
2.1 KiB
TypeScript
46 lines
2.1 KiB
TypeScript
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import test from "node:test";
|
|
|
|
test("lazy load failures use a real page reload recovery", () => {
|
|
const source = readFileSync(new URL("./ui/lazy-load-boundary.tsx", import.meta.url), "utf8");
|
|
|
|
assert.match(source, /window\.location\.reload\(\)/);
|
|
assert.match(source, />\s*Reload\s*</);
|
|
});
|
|
|
|
test("SFTP text editor keeps a closable dialog while its chunk loads", () => {
|
|
const source = readFileSync(new URL("./sftp/SftpOverlays.tsx", import.meta.url), "utf8");
|
|
const loadingIndex = source.indexOf("const TextEditorModalLoading");
|
|
const suspenseFallbackIndex = source.indexOf("<TextEditorModalLoading", loadingIndex);
|
|
const unavailableIndex = source.indexOf("const TextEditorModalUnavailable");
|
|
const errorFallbackIndex = source.indexOf("<TextEditorModalUnavailable", unavailableIndex);
|
|
|
|
assert.notEqual(loadingIndex, -1);
|
|
assert.notEqual(suspenseFallbackIndex, -1);
|
|
assert.notEqual(unavailableIndex, -1);
|
|
assert.notEqual(errorFallbackIndex, -1);
|
|
});
|
|
|
|
test("settings lazy-load errors stay inside the active settings tab", () => {
|
|
const source = readFileSync(new URL("./SettingsPage.tsx", import.meta.url), "utf8");
|
|
const errorFallbackIndex = source.indexOf("const SettingsTabLoadError");
|
|
const tabContentIndex = source.indexOf("<SettingsTabContent value={value}>", errorFallbackIndex);
|
|
const boundaryFallbackIndex = source.indexOf("fallback={(error) => <SettingsTabLoadError value={value} error={error} />}");
|
|
|
|
assert.notEqual(errorFallbackIndex, -1);
|
|
assert.notEqual(tabContentIndex, -1);
|
|
assert.notEqual(boundaryFallbackIndex, -1);
|
|
});
|
|
|
|
test("Windows settings close uses a plain button without a primary tooltip", () => {
|
|
const source = readFileSync(new URL("./SettingsPage.tsx", import.meta.url), "utf8");
|
|
const closeIndex = source.indexOf('aria-label={t("common.close")}');
|
|
assert.notEqual(closeIndex, -1);
|
|
// The old Tooltip + TooltipContent("Close") rendered as a stuck blue chip over the chrome.
|
|
assert.doesNotMatch(
|
|
source.slice(Math.max(0, closeIndex - 200), closeIndex + 400),
|
|
/TooltipContent|TooltipTrigger/,
|
|
);
|
|
});
|