Skip to content

Add slow-path tests for PageRsFluxCBridge (Phase 5)#22985

Merged
nbradbury merged 3 commits into
trunkfrom
pages-list-phase5-bridge-test
Jun 16, 2026
Merged

Add slow-path tests for PageRsFluxCBridge (Phase 5)#22985
nbradbury merged 3 commits into
trunkfrom
pages-list-phase5-bridge-test

Conversation

@nbradbury

@nbradbury nbradbury commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

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 local PostModel. 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.

  1. Run ./gradlew :WordPress:testJetpackDebugUnitTest --tests "org.wordpress.android.ui.pagesrs.PageRsFluxCBridgeTest"
  • Verify all 7 tests pass (4 existing + 3 new)

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>
@dangermattic

dangermattic commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr22985-c5e042d
Build Number1496
Application IDorg.wordpress.android.prealpha
Commitc5e042d
Installation URL1s5ef7p5tr0lo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr22985-c5e042d
Build Number1496
Application IDcom.jetpack.android.prealpha
Commitc5e042d
Installation URL3293la3rfqgdg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

Copy link
Copy Markdown
Contributor

🤖 Build Failure Analysis

This build has failures. Claude has analyzed them - check the build annotations for details.

nbradbury and others added 2 commits June 16, 2026 07:28
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

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.46%. Comparing base (5853043) to head (c5e042d).
⚠️ Report is 1 commits behind head on trunk.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nbradbury nbradbury marked this pull request as ready for review June 16, 2026 12:47
@nbradbury nbradbury requested a review from adalpari June 16, 2026 12:47

@adalpari adalpari left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! :shipit:

@nbradbury nbradbury merged commit d3b5edc into trunk Jun 16, 2026
26 checks passed
@nbradbury nbradbury deleted the pages-list-phase5-bridge-test branch June 16, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants