mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 19:20:39 +09:00
Merge pull request #2512 from AllenHyang/fix/inbox-badge-counts-all-mine-issues-not-unread
fix(ui): inbox badge should only count unread mine issues
This commit is contained in:
commit
f559455d92
2 changed files with 16 additions and 1 deletions
|
|
@ -319,6 +319,21 @@ describe("inbox helpers", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("excludes read mine issues from the inbox badge count", () => {
|
||||
const result = computeInboxBadgeData({
|
||||
approvals: [],
|
||||
joinRequests: [],
|
||||
dashboard,
|
||||
heartbeatRuns: [],
|
||||
mineIssues: [makeIssue("1", false), makeIssue("2", false), makeIssue("3", true)],
|
||||
dismissed: new Set<string>(),
|
||||
});
|
||||
|
||||
expect(result.mineIssues).toBe(1);
|
||||
// inbox = mineIssues(1) + agent-error alert(1) + budget alert(1)
|
||||
expect(result.inbox).toBe(3);
|
||||
});
|
||||
|
||||
it("keeps read issues in the touched list but excludes them from unread counts", () => {
|
||||
const issues = [makeIssue("1", true), makeIssue("2", false)];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue