Add slow-path tests for PageRsFluxCBridge (Phase 5)#22985
Merged
Conversation
Covers the editor bridge's network fetch/insert/re-read flow and its error branch, which were previously untested. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Generated by 🚫 Danger |
Contributor
|
|
Contributor
|
|
Contributor
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
The fetched page is a pass-through to the mocked mapper, so build it via a single @Suppress("DoNotMockDataClass") helper instead of mocking the ~29-field data class inline. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #22985 +/- ##
=======================================
Coverage 37.45% 37.46%
=======================================
Files 2325 2325
Lines 125221 125221
Branches 17160 17160
=======================================
+ Hits 46905 46913 +8
+ Misses 74511 74502 -9
- Partials 3805 3806 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
This small PR adds tests for
PageRsFluxCBridge, which lets the new wordpress-rs pages list open a page in the FluxC-based editor by resolving a remote page id into a localPostModel. Its slow path — the network fetch, DB insert, and error handling that run whenever a page isn't already cached locally — previously had no test coverage.Testing instructions
Unit-test-only change.
./gradlew :WordPress:testJetpackDebugUnitTest --tests "org.wordpress.android.ui.pagesrs.PageRsFluxCBridgeTest"