thunderbird / thunderbird/stormbox
Fix AppLayout tests to attach the mail store successfully
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 105
- Forks
- 9
- Avg merge
- 18h 18m
- Merged PRs (30d)
- 16
Description
Problem
tests/unit/components/app-layout.test.ts uses a Repository mock that does not implement listAccounts. The mail store calls that method during attachment, so the suite repeatedly logs:
[mail-store] refreshFolders failed TypeError: repo.listAccounts is not a function
The tests still pass because the error is caught, meaning layout assertions run with folder attachment already broken. This can hide real regressions in account/folder-dependent layout behavior.
Acceptance criteria
- The AppLayout Repository mock implements the complete account/folder contract used during store attachment, including
listAccounts. - Test setup provides a coherent primary account and folder rows.
- The suite emits no
refreshFolders failederrors. - At least one assertion proves the mail store attached and loaded its folder state rather than merely rendering after a swallowed failure.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in tests/unit/components/app-layout.test.ts and trace the mail store attachment path to see which account and folder methods the Repository mock must provide. Run the AppLayout test, then verify the mock supplies a primary account and folder rows, no refreshFolders failed errors are emitted, and an assertion confirms the folder state loaded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100