Replace the sample data with synthetic fixtures and regenerate goldens and thumbnails
The template harness, tests and thumbnails now use a neutral vendor, bank account and a generated sample wordmark (scripts/logo/make-sample-logo.mjs). Layout goldens and the 14 picker thumbnails are regenerated. Fixture strings keep their original lengths where layout tests depend on them.
This commit is contained in:
@@ -18,7 +18,7 @@ pub const STATES: &[(&str, &str)] = &[
|
||||
("09", "Uttar Pradesh"),
|
||||
("10", "Bihar"),
|
||||
("11", "Sikkim"),
|
||||
("12", "Sampleachal Pradesh"),
|
||||
("12", "Arunachal Pradesh"),
|
||||
("13", "Nagaland"),
|
||||
("14", "Manipur"),
|
||||
("15", "Mizoram"),
|
||||
|
||||
@@ -404,7 +404,7 @@ mod tests {
|
||||
.await
|
||||
.unwrap();
|
||||
let raw = mock.requests.lock().unwrap()[0].clone();
|
||||
assert!(raw.starts_with("GET /api/resource/Sales%20Invoice/AP%2F2026-001?limit_page_length=0 "), "{raw}");
|
||||
assert!(raw.starts_with("GET /api/resource/Sales%20Invoice/INV%2F2026-001?limit_page_length=0 "), "{raw}");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
@@ -820,7 +820,7 @@ fn sync_status_list_and_open_url() {
|
||||
let s = sync_status(&conn, inv.id).unwrap();
|
||||
assert_eq!((s.status.as_str(), s.remote_name.as_str(), s.remote_docstatus, s.attached), ("synced", "INV/2026-001", 1, true));
|
||||
assert_eq!(sync_statuses(&conn).unwrap(), vec![s]);
|
||||
assert_eq!(open_url(&conn, inv.id).unwrap(), "http://127.0.0.1:8000/app/sales-invoice/AP%2F2026-001");
|
||||
assert_eq!(open_url(&conn, inv.id).unwrap(), "http://127.0.0.1:8000/app/sales-invoice/INV%2F2026-001");
|
||||
// Names with spaces and other characters stay one path segment.
|
||||
conn.execute("UPDATE erpnext_sync SET remote_name = 'SINV 26/1?x' WHERE invoice_id = ?1", params![inv.id]).unwrap();
|
||||
assert_eq!(open_url(&conn, inv.id).unwrap(), "http://127.0.0.1:8000/app/sales-invoice/SINV%2026%2F1%3Fx");
|
||||
|
||||
@@ -540,8 +540,8 @@ mod tests {
|
||||
let out = process_logo(&bytes).unwrap();
|
||||
let m = &out.metrics;
|
||||
assert_eq!((m.source_width, m.source_height), (2172, 724));
|
||||
assert!((4.5..=4.7).contains(&m.aspect), "aspect {}", m.aspect);
|
||||
assert!((0.40..=0.46).contains(&m.ink_density), "density {}", m.ink_density);
|
||||
assert!((5.3..=5.6).contains(&m.aspect), "aspect {}", m.aspect);
|
||||
assert!((0.50..=0.60).contains(&m.ink_density), "density {}", m.ink_density);
|
||||
assert_eq!(m.kind, LogoKind::Wordmark);
|
||||
assert!(out.print_png.len() <= 120 * 1024, "print is {} bytes", out.print_png.len());
|
||||
assert!(out.knockout_png.is_some());
|
||||
|
||||
Reference in New Issue
Block a user