Provisioned emails are delivered asynchronously; the single refresh done
right after provisioning can miss them, making download_all_attachments_test
(and other web scenarios opening a freshly provisioned email) time out.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
waitUntilVisible only pumps frames and does not yield to the browser event
loop, so the email reload following an empty-trash action may never be
processed. Poll with waitForCondition + pump, as other web robots do.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The previous which<>() predicate on EmailTileBuilder.subjectContains
returned no matches in the search results context. Replace with a
container-scoped count inside #search_email_list_notification_listener.
Also replace the FocusNode listener on the search text field with an
onTap callback: the listener fired on programmatic focus restoration
after the label bottom sheet closed, incorrectly resetting
searchIsRunning to false before the search completed.
(cherry picked from commit a79568c124)
These scenarios started interacting with the UI (open composer, open
mailbox) before MailboxDashBoardController finished initializing,
causing intermittent failures. Add waitForMailboxReady() at the start
of each runTestLogic() to ensure the controller is ready first.
Fixes: open_insert_link_dialog_via_keyboard_shortcut, send_email_with_read_receipt_enabled,
save_as_template, save_template_with_attachment_then_open_and_save_template_again,
send_email_with_mark_as_important, select_identity_as_default
(cherry picked from commit ea6cc361ed)
hitTestable() on the integration_testing_email_detailed_divider failed
when the email body was still rendering off-screen. Remove hitTestable
and use TestTimeouts.long so the check waits until the divider exists
in the tree rather than requiring it to be tappable.
(cherry picked from commit 1f975920ee)
expectViewVisible resolved immediately with no match when selectedIdentity
was still null. Replace with waitForCondition so it retries until the
identity loads.
(cherry picked from commit c4872f8a7a)
Synchronous expect fired before JMAP GetAllIdentities response arrived.
Replace with waitForCondition polling so the check retries until the
selectedIdentity is populated.
(cherry picked from commit 3faf402ddd)
Without this, provisionEmail() runs before the role-to-mailbox mapping
is populated, causing emails to be delivered to wrong folders.
Fixes: reply_inline_focused_with_signature, display_and_scroll_email_with_long_content,
empty_and_recover_spam, empty_and_recover_trash, mailbox_move_email,
search_email_by_date_time_and_sort_order_relevance, search_email_with_tag,
search_result_highlights
(cherry picked from commit ede8239e37)