mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Tests: follow the newer framework pin
The shared live client now reads integrations.whenAppClosed inside the framework, so the preference audit lists it as read there. The pin also brings #12709's Add Anchor Point change (Alt on an anchor no longer deletes it), so the anchor test expects that, as #13977 does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
810f4cb7eb
commit
8edff6734a
2 files changed
+7
-6
No files matched your search
@@ -114,8 +114,9 @@ fn inherent_impls(src: &str, name: &str) -> String {
|
||||
}
|
||||
|
||||
/// Agent settings the framework's `AgentSettings` reads itself (the control link binds
|
||||
/// `control_port`; `read_folder()` supplies the read root), so no PhotoCraft source names the field.
|
||||
const READ_BY_THE_FRAMEWORK: &[&str] = &["integrations.controlPort", "integrations.readRoot"];
|
||||
/// `control_port`; `read_folder()` supplies the read root; the shared live client picks the
|
||||
/// closed-app choice from `when_app_closed`), so no PhotoCraft source names the field.
|
||||
const READ_BY_THE_FRAMEWORK: &[&str] = &["integrations.controlPort", "integrations.readRoot", "integrations.whenAppClosed"];
|
||||
|
||||
#[test]
|
||||
fn every_preference_is_read_or_hidden() {
|
||||
|
||||
@@ -63,7 +63,7 @@ fn add_on_a_straight_segment_inserts_a_smooth_anchor_in_one_step() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn delete_removes_the_clicked_anchor_and_alt_swaps_the_tools() {
|
||||
fn delete_removes_the_clicked_anchor_and_alt_makes_it_add() {
|
||||
let mut app = app(Tool::DeleteAnchorPoint);
|
||||
with_path(&mut app);
|
||||
let n = steps(&app);
|
||||
@@ -72,15 +72,15 @@ fn delete_removes_the_clicked_anchor_and_alt_swaps_the_tools() {
|
||||
assert_eq!((p.subpaths[0].knots.len(), p.subpaths[0].closed), (3, true));
|
||||
assert_eq!(p.subpaths[0].knots[2].anchor, Point::new(40.0, 120.0));
|
||||
assert_eq!(app.session.active().unwrap().history.undo_label(), Some("Delete Anchor Point"));
|
||||
// ⌥ with Delete adds; ⌥ with Add deletes.
|
||||
// ⌥ with Delete adds; ⌥ with Add deletes nothing (#12709).
|
||||
click(&mut app, [80.0, 120.0], Modifiers::ALT);
|
||||
assert_eq!(work(&app).subpaths[0].knots.len(), 3, "the bottom edge is gone; ⌥ on empty canvas adds nothing");
|
||||
click(&mut app, [40.0, 80.0], Modifiers::ALT);
|
||||
assert_eq!(work(&app).subpaths[0].knots.len(), 4);
|
||||
app.ui.tool = Tool::AddAnchorPoint;
|
||||
click(&mut app, [40.0, 80.0], Modifiers::ALT);
|
||||
assert_eq!(work(&app).subpaths[0].knots.len(), 3);
|
||||
assert_eq!(steps(&app), n + 3);
|
||||
assert_eq!(work(&app).subpaths[0].knots.len(), 4);
|
||||
assert_eq!(steps(&app), n + 2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user