git clone https://garage44.eu/jeroen/pinnacle.gitcartopolis-agent · 2026-11-30T18:39:20Z
test(xtask): files-demo makes, renames and deletes a folder Folders made, renamed and deleted in Files (622d483) had no demo driving them. files-demo now makes a folder, moves the picture into it, renames the folder and the picture, and deletes the folder with the picture in it, waiting for each one's log line and photographing four steps.
xtask/src/main.rs | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index 0704aa1..57f12b9 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -3557,6 +3557,8 @@ fn harbour_png() -> Vec<u8> {
/// moved to the person's own files, the other deleted; Notes then has one.
/// Then a picture and a file that is neither text nor a picture, fetched
/// in the Terminal, opened in Files: the one shown, the other said so.
+/// Last a folder made, the picture moved into it, both renamed, and the
+/// folder deleted with the picture in it.
fn files_demo() -> Result {
const P: &str = "filer: button ";
let dir = demo_dir("demo-files")?;
@@ -3663,6 +3665,49 @@ fn files_demo() -> Result {
s.wait_for("filer: opened data:/readings.bin")?;
std::thread::sleep(Duration::from_millis(600));
s.shot(&dir.join("10-nothing-opens-it.png"))?;
+ if !pinnacle_layout::notes::two_panes(w) {
+ s.tap_named(P, "close")?;
+ }
+
+ // A folder of the person's own: made, the picture moved into it, the
+ // folder and the picture renamed, and the folder deleted with it.
+ s.tap_named(P, "new-folder")?;
+ s.find_named(&format!("{P}name-done"))?;
+ s.type_keys("Harbour trip\n")?;
+ s.wait_for("filer: made folder data:/Harbour trip")?;
+ s.find_named(&format!("{P}row Harbour trip"))?;
+ s.shot(&dir.join("11-new-folder.png"))?;
+ s.tap_named(P, "row harbour.png")?;
+ s.find_named(&format!("{P}move"))?;
+ s.tap_named(P, "move")?;
+ s.tap_named(P, "row Harbour trip")?;
+ s.wait_for("filer: opened folder data:/Harbour trip")?;
+ s.tap_named(P, "move-here")?;
+ s.wait_for("filer: moved ")?;
+ s.tap_named(P, "rename-folder")?;
+ s.find_named(&format!("{P}name-done"))?;
+ s.press_keys(&[&["ctrl", "a"]])?;
+ s.type_keys("Harbour 2026\n")?;
+ s.wait_for("filer: renamed folder data:/Harbour trip to data:/Harbour 2026")?;
+ s.tap_named(P, "row harbour.png")?;
+ s.find_named(&format!("{P}rename"))?;
+ s.tap_named(P, "rename")?;
+ s.find_named(&format!("{P}name-done"))?;
+ s.press_keys(&[&["ctrl", "a"]])?;
+ s.type_keys("boats.png\n")?;
+ s.wait_for("filer: renamed data:/Harbour 2026/harbour.png to data:/Harbour 2026/boats.png")?;
+ std::thread::sleep(Duration::from_millis(600));
+ s.shot(&dir.join("12-renamed.png"))?;
+ if !pinnacle_layout::notes::two_panes(w) {
+ s.tap_named(P, "close")?;
+ }
+ s.tap_named(P, "delete-folder")?;
+ s.find_named(&format!("{P}delete-folder-for-good"))?;
+ s.shot(&dir.join("13-delete-folder.png"))?;
+ s.tap_named(P, "delete-folder-for-good")?;
+ s.wait_for("filer: deleted folder data:/Harbour 2026")?;
+ std::thread::sleep(Duration::from_millis(600));
+ s.shot(&dir.join("14-folder-deleted.png"))?;
Ok(())
}