matrix-org / matrix-rich-text-editor

Matrix Rich Text Editor
https://matrix-org.github.io/matrix-rich-text-editor/
Apache License 2.0
84 stars 20 forks source link

[Android] Test composable selection state restoration #868

Closed jonnyandrew closed 8 months ago

jonnyandrew commented 8 months ago

Improve an Android test so that it catches issues with restoring the state of text selection in the composable editor (see https://github.com/matrix-org/matrix-rich-text-editor/pull/864/files#r1394453456).

codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (581f1dd) 88.00% compared to head (5a0f0a7) 89.35%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #868 +/- ## ========================================== + Coverage 88.00% 89.35% +1.35% ========================================== Files 118 86 -32 Lines 16845 15271 -1574 Branches 634 0 -634 ========================================== - Hits 14825 13646 -1179 + Misses 1991 1625 -366 + Partials 29 0 -29 ``` | [Flag](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/868/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/868/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | `89.35% <ø> (+1.35%)` | :arrow_up: | | [unittests-ios](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/868/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | `?` | | | [unittests-rust](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/868/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | `89.35% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jmartinesp commented 8 months ago

I added something similar already in #864, but maybe we can add the <b> tag here to make the tests more complete?

jonnyandrew commented 8 months ago

I added multiple lines to the editor to address https://github.com/matrix-org/matrix-rich-text-editor/pull/864#discussion_r1394514834

sonarcloud[bot] commented 8 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information