thunderbird / thunderbird/stormbox

Fix AppLayout tests to attach the mail store successfully

Open Beginner friendly
#83 0 comments 0 reactions 0 assignees View on GitHub

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 failed errors.
  • At least one assertion proves the mail store attached and loaded its folder state rather than merely rendering after a swallowed failure.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.