mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-29 20:47:32 -06:00
Tests: field highlights are on by default, so the toggle reads "Hide field highlights" (#2273)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
280f2439ec
commit
f295be1e05
@@ -67,6 +67,7 @@ fn push_buttons_alone_show_no_form_bar_and_a_screen_annotation_is_not_a_comment(
|
||||
}
|
||||
assert!(h.query_by_label_contains("interactive form fields").is_none(), "nothing to fill in, so no form bar");
|
||||
assert!(h.query_by_label("Highlight fields").is_none());
|
||||
assert!(h.query_by_label("Hide field highlights").is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -75,5 +76,5 @@ fn a_fillable_field_beside_push_buttons_still_shows_the_form_bar() {
|
||||
let text = "<< /Type /Annot /Subtype /Widget /FT /Tx /T (name) /Rect [20 160 200 180] /P 3 0 R >>";
|
||||
let h = open(pdf(&[&button, text, SCREEN]));
|
||||
h.get_by_label_contains("This document contains 2 interactive form fields.");
|
||||
h.get_by_label("Highlight fields");
|
||||
h.get_by_label("Hide field highlights");
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ fn a_dynamic_xfa_form_is_laid_out_and_filled() {
|
||||
let doc = s.session.get(s.views[0].id).unwrap();
|
||||
assert_eq!(doc.info.pages.len(), 2);
|
||||
assert!(doc.form.iter().any(|f| f.name == "familyName"));
|
||||
// The notice offers to highlight the fields, like any form.
|
||||
h.get_by_label("Highlight fields");
|
||||
// The notice offers the highlight toggle, like any form; highlights are on by default.
|
||||
h.get_by_label("Hide field highlights");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -87,8 +87,8 @@ fn a_static_xfa_form_is_filled_from_its_data_and_says_so() {
|
||||
assert_eq!(doc.form.iter().find(|f| f.name == "form1[0].page1[0].name[0]").unwrap().value, vec!["Ada".to_string()]);
|
||||
assert_eq!(doc.form.iter().find(|f| f.name == "form1[0].page1[0].agree[0]").unwrap().value, vec!["1".to_string()]);
|
||||
assert!(!doc.dirty);
|
||||
// The fields can still be highlighted from the notice.
|
||||
h.get_by_label("Highlight fields");
|
||||
// The highlight toggle (on by default, so it reads "Hide") is still in the notice.
|
||||
h.get_by_label("Hide field highlights");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user