Fix two tests that fail on macOS: the temp folder's real path and the select-all key

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-18 19:45:04 -08:00
1 parent ce073cd07a
commit 3b09d03090
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -374,7 +374,8 @@ test("wait reads --seconds 6s as six seconds, not as nothing", () => {
}); });
test("only an installed console's open leaves the console-dir pointer; status, help, a bad command and a source checkout's open do not", () => { test("only an installed console's open leaves the console-dir pointer; status, help, a bad command and a source checkout's open do not", () => {
const home = fs.mkdtempSync(path.join(os.tmpdir(), "p2c-pointer-")); // macOS hands out a temp folder under the /var link, and the console writes the real path.
const home = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "p2c-pointer-")));
const env = { PLAN2CODE_CONSOLE_HOME: home, PLAN2CODE_MODELS_DIR: path.join(home, "plan2code") }; const env = { PLAN2CODE_CONSOLE_HOME: home, PLAN2CODE_MODELS_DIR: path.join(home, "plan2code") };
const pointer = path.join(home, "console-dir"); const pointer = path.join(home, "console-dir");
fs.writeFileSync(path.join(home, "update-check.json"), JSON.stringify({ checkedAt: Date.now(), latest: null })); fs.writeFileSync(path.join(home, "update-check.json"), JSON.stringify({ checkedAt: Date.now(), latest: null }));
+1 -1
View File
@@ -544,7 +544,7 @@ test("each tab keeps its own text and pictures, and switching never saves into t
const notes = idOf(s, "Notes"); const notes = idOf(s, "Notes");
const ideas = idOf(s, "Ideas"); const ideas = idOf(s, "Ideas");
// The new tab opens with its heading and the editor focused: clear it to start from empty. // The new tab opens with its heading and the editor focused: clear it to start from empty.
await s.page.keyboard.press("Control+a"); await s.page.keyboard.press("ControlOrMeta+a");
await s.page.keyboard.press("Delete"); await s.page.keyboard.press("Delete");
await until(() => readNotepad(s.project, notes).text === "notes text" && readNotepad(s.project, ideas).text === "", 4000); await until(() => readNotepad(s.project, notes).text === "notes text" && readNotepad(s.project, ideas).text === "", 4000);
await typeInto(s, "ideas text"); await typeInto(s, "ideas text");