Skip to content

test(SDK-617): add unit tests for IterableInboxDataModel - #938

Merged
jferrao-itrbl merged 4 commits into
masterfrom
feature/SDK-617-tests-for-IterableInboxDataModel
Nov 8, 2026
Merged

jferrao-itrbl merged 4 commits into
masterfrom
feature/SDK-617-tests-for-IterableInboxDataModel

Conversation

@jferrao-itrbl

@jferrao-itrbl jferrao-itrbl commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

📝 Summary

Add Jest coverage for IterableInboxDataModel (refresh, failure path, formatting, IterableApi calls).

🎟️ Jira Ticket: SDK-617

📖 Description

Introduces src/inbox/classes/IterableInboxDataModel.test.ts with IterableApi spies: refresh() applies filter/comparator and maps rows; rejection yields []; default and custom date mappers; delegation for read, delete, HTML fetch, session start/end (with updateVisibleRows ordering), and updateVisibleRows.

🧪 How to test?

  • yarn test src/inbox/classes/IterableInboxDataModel.test.ts
  • Full gate: yarn lint && yarn typecheck && yarn test --coverage && yarn check:circular

🧾 Changelog

No customer facing changes

📹 Loom recording if applicable

N/A

🐞 Github Issues solved

N/A

📚 Docs PR if applicable

N/A

Cover refresh mapping, fetch failure, date formatting, and IterableApi
delegation so inbox data model behaviour stays regression-safe.
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Lines Statements Branches Functions
Coverage: 84%
84.55% (728/861) 73.21% (298/407) 82.84% (227/274)

@qltysh

qltysh Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Qlty


Coverage Impact

⬆️ Merging this pull request will increase total coverage on master by 3.3%.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Add coverage for sortByMostRecent when no comparator is set and split the
custom-comparator case from misleading titles (review F1–F2).
@jferrao-itrbl
jferrao-itrbl marked this pull request as ready for review November 6, 2026 09:25
@jferrao-itrbl
jferrao-itrbl requested a review from a team as a code owner November 6, 2026 09:25

@rtlsilva rtlsilva left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with non-blocking comments

Comment thread CHANGELOG.md Resolved
Revert test-only CHANGELOG entry; strengthen refresh comparator and row
mapping tests; restoreAllMocks; input-sensitive date mapper coverage.
@jferrao-itrbl
jferrao-itrbl merged commit ad317db into master Nov 8, 2026
22 checks passed
@jferrao-itrbl
jferrao-itrbl deleted the feature/SDK-617-tests-for-IterableInboxDataModel branch November 8, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants