fw sync: unsaved question long-text trial finds the question as an alert dialog

Upstream made the unsaved question Role::ALERT_DIALOG; the port trial looked it up as
Role::DIALOG. Only the lookup changes; the check that the text stays inside stands.
This commit is contained in:
Dylan M. Taylor
2026-11-23 02:42:51 -05:00
parent a0035430e5
commit 33d7e8d65e
+2 -1
View File
@@ -396,7 +396,8 @@ fn unsaved_question_keeps_long_text_inside_its_dialog() {
host.borrow_mut()
.open(UnsavedChangesDialog::new(CloseScope::Close, "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.pdf"));
fixture.idle(6);
let dialog = fixture.by_role(Role::DIALOG).first().expect("the question").rect;
// The question is an alert dialog (upstream's role for the unsaved question).
let dialog = fixture.by_role(Role::ALERT_DIALOG).first().expect("the question").rect;
assert!(dialog.left() >= 0.0 && dialog.right() <= 820.0, "the question stays on screen: {dialog:?}");
let runs = fixture.texts();
let message = runs.iter().find(|run| run.text.contains("WWWWWWWW")).expect("the document name is painted");