mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-18 21:01:19 -08:00
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:
1 parent
ce073cd07a
commit
3b09d03090
2 files changed
+3
-2
No files matched your search
@@ -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", () => {
|
||||
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 pointer = path.join(home, "console-dir");
|
||||
fs.writeFileSync(path.join(home, "update-check.json"), JSON.stringify({ checkedAt: Date.now(), latest: null }));
|
||||
|
||||
@@ -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 ideas = idOf(s, "Ideas");
|
||||
// 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 until(() => readNotepad(s.project, notes).text === "notes text" && readNotepad(s.project, ideas).text === "", 4000);
|
||||
await typeInto(s, "ideas text");
|
||||
|
||||
Reference in new issue
Block a user