Tests: check the nightly id against packaging and the panel at the window top

The nightly id test now also reads the published package id from
packaging/macos/nightly_plist.py and nightly-lib.sh, and the Position
Panel Above Text test requires the panel top to equal the window top.
This commit is contained in:
dotCooCoo committed 2026-12-01 02:27:41 -08:00
1 parent 42a7b9ea08
commit 7e1fe2afad
2 files changed
+7 -1

No files matched your search

+5
View File
@@ -122,6 +122,11 @@ mod tests {
assert_eq!(id_for(LaunchIdentity::NightlyV1), NIGHTLY_APP_ID);
assert!(NIGHTLY_PACKAGE_ID.ends_with(".nightly"), "{NIGHTLY_PACKAGE_ID}");
assert_eq!(NIGHTLY_APP_ID.strip_suffix("-v1"), Some(NIGHTLY_PACKAGE_ID), "the window id is the package id plus -v1");
// The packaging publishes the same package id.
let plist = include_str!("../../../packaging/macos/nightly_plist.py");
assert!(plist.contains(&format!("IDENTIFIER = \"{NIGHTLY_PACKAGE_ID}\"")), "nightly_plist.py");
let lib = include_str!("../../../packaging/macos/nightly-lib.sh");
assert!(lib.contains(&format!("MAC_NIGHTLY_ID='{NIGHTLY_PACKAGE_ID}'")), "nightly-lib.sh");
}
#[test]
+2 -1
View File
@@ -1090,6 +1090,7 @@ fn above_text_puts_the_panel_at_the_top_when_below_the_text_does_not_fit() {
above_text(&mut app, &node, span).unwrap();
// Neither above the text (off the window) nor below it (inside the canvas): at the window's top.
let (top, canvas) = (tabs_rect(&app).min.y, app.canvas_view().unwrap().rect);
assert!(top >= 0.0 && top < canvas.top(), "view centered at y {center_y}: panel top {top}, canvas {canvas:?}");
assert!(canvas.top() > 0.0, "canvas {canvas:?}");
assert_eq!(top, 0.0, "view centered at y {center_y}: panel top {top}, canvas {canvas:?}");
}
}