Merge branch 't3/p15-c1-desktop-packages': packages for Windows, macOS and Linux, and the Claude desktop extension (P15 C1)

The two Connect page baselines are re-blessed on the merged code: the
page gained the extension row here and the stopped test clock on main.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 15:57:46 -07:00
commit 813042a7a6
53 files changed
+3875 -276

No files matched your search

+55
View File
@@ -247,6 +247,17 @@ impl Owner for Fake {
self.note(format!("connect {} {book}", agent.key()));
Ok(vec![format!("{} reaches the books.", agent.label())])
}
fn claude_desktop_extension(
&self,
book: &str,
company: &str,
) -> Result<ledger_gui::owner::ExtensionMade, String> {
self.note(format!("extension {book} {company}"));
Ok(ledger_gui::owner::ExtensionMade {
file: "/docs/Wanderbooks/Extensions/wanderbooks-alpha.mcpb".into(),
folder: "/docs/Wanderbooks/Extensions".into(),
})
}
fn new_books(&self, _: &str, _: &str) -> Result<String, String> {
Err("not here".into())
}
@@ -731,6 +742,50 @@ fn the_connect_buttons_do_what_connect_does() {
drop(h);
}
/// WB-pkg-5: the "Claude desktop app" row makes the extension for this
/// company through the owner, then says in words what to do with the file.
#[test]
fn the_claude_desktop_row_makes_the_extension_and_says_what_to_do_next() {
let w = World::new(&[("alpha", "Wanderland Labs")]);
let owner = Fake::new();
owner.answer(roster(vec![], vec![]));
let mut h = start(&w, &["alpha"], &owner);
refresh(&mut h);
h.state_mut().goto(Route::Connect);
h.run_steps(3);
assert!(h.query_by_label_contains("Claude desktop app").is_some());
assert!(
h.query_by_label_contains("Show the file").is_none(),
"nothing is made yet"
);
h.get_by_role_and_label(Role::Button, "Make the Claude extension")
.click();
h.run_steps(2);
wait_for("the extension was made", || {
owner
.said()
.contains(&"extension alpha Wanderland Labs".to_string())
});
until(&mut h, "it said what came of it", |a| {
a.views()[0].connect_state().said().is_some()
});
h.run_steps(2);
for words in [
"wanderbooks-alpha.mcpb",
"Settings",
"Extensions",
"Install Extension",
"Keep Wanderbooks open",
] {
assert!(
h.query_by_label_contains(words).is_some(),
"{words} is said on the page"
);
}
assert!(h.query_by_label_contains("Show the file").is_some());
drop(h);
}
// ---- 5: the warning before a close ---------------------------------------------
fn connected_alpha(owner: &Fake) {
@@ -1 +1 @@
b2f05e2383abc93a
c44ce509bf9179de
@@ -1 +1 @@
982cea77ed6d057f
ceb2e1edc0d868ff
+7 -7
View File
@@ -336,7 +336,7 @@ fn each_tab_shows_its_own_company_and_figures() {
loaded(&mut h);
assert_eq!(titles(&h), ["Alpha Co", "Beta Co"]);
assert_eq!(h.state().active(), Some(0));
assert_eq!(h.state().window_title(), "Alpha Co · wanderbooks");
assert_eq!(h.state().window_title(), "Alpha Co · Wanderbooks");
// Alpha: cash 10,000.00 less 1,234.56 rent is 8,765.44.
assert!(shows(&h, "8,765.44"), "alpha's cash: {:?}", texts(&h));
@@ -354,7 +354,7 @@ fn each_tab_shows_its_own_company_and_figures() {
// Beta: cash 25,000.00 less 777.77 is 24,222.23.
show_tab(&mut h, "Beta Co");
assert_eq!(h.state().active(), Some(1));
assert_eq!(h.state().window_title(), "Beta Co · wanderbooks");
assert_eq!(h.state().window_title(), "Beta Co · Wanderbooks");
assert!(
matches!(h.state().route(), Route::Overview),
"a tab opens on its overview, not on the page the other was on"
@@ -768,7 +768,7 @@ fn start_up_restores_the_open_tabs_their_order_and_the_one_in_front() {
assert_eq!(titles(&h), ["Gamma Co", "Alpha Co", "Beta Co"]);
assert_eq!(h.state().active(), Some(1), "the same one in front");
assert!(h.state().views().iter().all(|v| v.error().is_none()));
assert_eq!(h.state().window_title(), "Alpha Co · wanderbooks");
assert_eq!(h.state().window_title(), "Alpha Co · Wanderbooks");
// No record: the data root's first, alone.
let h2 = start_with_prefs(&w, &[]);
@@ -894,15 +894,15 @@ fn closing_the_front_tab_shows_a_neighbour_and_the_last_leaves_an_empty_window()
show_tab(&mut h, "Beta Co");
close_tab(&mut h, "Beta Co");
assert_eq!(titles(&h), ["Alpha Co", "Gamma Co"]);
assert_eq!(h.state().window_title(), "Gamma Co · wanderbooks");
assert_eq!(h.state().window_title(), "Gamma Co · Wanderbooks");
// A tab behind the front one closing leaves the front one in front.
close_tab(&mut h, "Alpha Co");
assert_eq!(titles(&h), ["Gamma Co"]);
assert_eq!(h.state().window_title(), "Gamma Co · wanderbooks");
assert_eq!(h.state().window_title(), "Gamma Co · Wanderbooks");
// The last one.
close_tab(&mut h, "Gamma Co");
assert!(h.state().views().is_empty());
assert_eq!(h.state().window_title(), "wanderbooks");
assert_eq!(h.state().window_title(), "Wanderbooks");
assert!(shows(&h, "No company is open"), "{:?}", texts(&h));
assert!(
shows(&h, "Open a company with the + at the top of the window."),
@@ -1737,7 +1737,7 @@ fn the_status_card_shows_the_company_in_front_and_follows_the_tab() {
"alpha's hue left the card"
);
// The window's title still names the company.
assert_eq!(h.state().window_title(), "Beta Co · wanderbooks");
assert_eq!(h.state().window_title(), "Beta Co · Wanderbooks");
}
}
+57 -2
View File
@@ -21,6 +21,7 @@ use std::sync::{Arc, Mutex, OnceLock};
struct Fake {
asked: Mutex<Vec<String>>,
staged: Mutex<bool>,
newer: Mutex<bool>,
}
impl Fake {
@@ -57,6 +58,12 @@ impl Owner for Fake {
staged_at: "2026-10-30T08:00:00Z".into(),
})
}
fn newer_version(&self) -> Option<ledger_gui::owner::NewerVersion> {
(*self.newer.lock().unwrap()).then(|| ledger_gui::owner::NewerVersion {
version: "9.2.0".into(),
page: "https://example.test/releases/latest".into(),
})
}
fn check_for_updates(&self) -> Result<Vec<String>, String> {
self.said("check");
*self.staged.lock().unwrap() = true;
@@ -159,7 +166,7 @@ fn the_menu_checks_for_updates_and_a_waiting_update_shows_a_notice_that_accepts(
// owner, and the notice goes once it is installed.
for _ in 0..60 {
h.run_steps(2);
if h.query_by_label_contains("Version 9.1.0 of wanderbooks is ready")
if h.query_by_label_contains("Version 9.1.0 of Wanderbooks is ready")
.is_some()
{
break;
@@ -167,7 +174,7 @@ fn the_menu_checks_for_updates_and_a_waiting_update_shows_a_notice_that_accepts(
std::thread::sleep(std::time::Duration::from_millis(100));
}
assert!(
h.query_by_label_contains("Version 9.1.0 of wanderbooks is ready")
h.query_by_label_contains("Version 9.1.0 of Wanderbooks is ready")
.is_some(),
"no notice"
);
@@ -194,3 +201,51 @@ fn books_outside_a_data_root_have_no_update_notice() {
assert!(h.query_by_label_contains("is ready.").is_none());
*f.staged.lock().unwrap() = false;
}
/// WB-pkg-3: with no update of the program's own waiting, a newer version
/// the daily look found is told in a standing notice that says where to
/// get it and that books, keys and connections stay; an update that is
/// waiting is the only notice shown (one at a time).
#[test]
fn a_newer_version_is_told_with_where_to_get_it() {
let _alone = alone();
let f = fake();
*f.newer.lock().unwrap() = true;
let (_dir, _book, b) = books(true);
let mut h = harness(b);
for _ in 0..60 {
h.run_steps(2);
if h.query_by_label_contains("Version 9.2.0 of Wanderbooks is available")
.is_some()
{
break;
}
std::thread::sleep(std::time::Duration::from_millis(100));
}
assert!(
h.query_by_label_contains("Version 9.2.0 of Wanderbooks is available")
.is_some(),
"no notice"
);
assert!(
h.query_by_label_contains("Your books, keys and connections stay as they are")
.is_some()
);
assert!(h.query_by_label("Open the download page").is_some());
// One notice at a time: a staged update wins.
*f.staged.lock().unwrap() = true;
for _ in 0..60 {
h.run_steps(2);
if h.query_by_label_contains("is ready.").is_some() {
break;
}
std::thread::sleep(std::time::Duration::from_millis(100));
}
assert!(h.query_by_label_contains("is ready.").is_some());
assert!(
h.query_by_label_contains("Version 9.2.0 of Wanderbooks is available")
.is_none()
);
*f.staged.lock().unwrap() = false;
*f.newer.lock().unwrap() = false;
}