mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 00:57:26 +00:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user