fix(test): sync before searching in second searchEmails IMAP test #519

Merged
guettlibot merged 1 commits from issue-506-fix-search-emails-tests into main 2026-06-07 00:49:54 +00:00
guettlibot commented 2026-06-07 00:49:42 +00:00 (Migrated from codeberg.org)

Summary

  • Adds syncEmails('test', 'INBOX') call before searchEmails in the second backend test (searchEmails returns empty list when no messages match), matching the fix already applied to the first test in commit a67b707
  • Adds a clarifying comment to searchEmails in email_repository_impl.dart noting that results depend on the local FTS5 index being populated via syncEmails

Context

Since PR #503 switched searchEmails from IMAP UID SEARCH to local SQLite FTS5, the backend tests must call syncEmails first to populate the index before searching. The first test was already fixed; this completes the fix for the second test.

Test plan

  • flutter test test/backend/email_repository_imap_test.dart — both searchEmails tests should pass once the IMAP backend is running
  • CI backend test step should no longer fail on these two tests

Closes #506

## Summary - Adds `syncEmails('test', 'INBOX')` call before `searchEmails` in the second backend test (`searchEmails returns empty list when no messages match`), matching the fix already applied to the first test in commit a67b707 - Adds a clarifying comment to `searchEmails` in `email_repository_impl.dart` noting that results depend on the local FTS5 index being populated via `syncEmails` ## Context Since PR #503 switched `searchEmails` from IMAP `UID SEARCH` to local SQLite FTS5, the backend tests must call `syncEmails` first to populate the index before searching. The first test was already fixed; this completes the fix for the second test. ## Test plan - [ ] `flutter test test/backend/email_repository_imap_test.dart` — both `searchEmails` tests should pass once the IMAP backend is running - [ ] CI backend test step should no longer fail on these two tests Closes #506
Sign in to join this conversation.