Skip to content

fix(tests): scope statusbar readiness to the tested WebView - #1744

Merged
GitToTheHub merged 1 commit into
apache:masterfrom
GitToTheHub:fix/statusbar-test-readiness
Nov 11, 2026
Merged

GitToTheHub merged 1 commit into
apache:masterfrom
GitToTheHub:fix/statusbar-test-readiness

Conversation

@GitToTheHub

@GitToTheHub GitToTheHub commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Platforms affected

iOS native test suite.

Motivation and Context

The statusbar tests can evaluate JavaScript before their own document is ready: the readiness notification has no WebView identity, and each test starts another navigation even though making its view controller visible already loads the start page. During an 8.2.0 release review this intermittently produced window.statusbar.setBackgroundColor is not a function and command-queue timeouts.

Description

Post the originating WebView with the test app's readiness notification, filter each statusbar expectation to the tested WebView, and rely on the initial navigation. Existing unfiltered consumers of this test notification still work. Production code is unchanged.

Testing

  • Xcode 27.1, iPhone Duo simulator, iOS 27.1: all 9 CDVStatusBarTests passed on this branch.
  • The same test-only synchronization changes passed all 9 statusbar tests in 3 repetitions during diagnosis (27 executions).
  • git diff --check passed.

Checklist

  • Ran the affected native tests successfully
  • Updated the existing automated tests for this change
  • Commit uses the repository's fix(tests): convention (iOS-only repository)
  • No existing issue to link
  • Documentation changes are not needed for a test-only fix

AI assistance

This contribution was created with AI assistance from Codex (GPT-6.1 Sol), including the statusbar test readiness synchronization changes.

@codecov-commenter

codecov-commenter commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.72%. Comparing base (f9bb658) to head (92731d3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1744   +/-   ##
=======================================
  Coverage   82.72%   82.72%           
=======================================
  Files          17       17           
  Lines        5234     5234           
=======================================
  Hits         4330     4330           
  Misses        904      904           

☔ 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.

@dpogue dpogue added this to the 8.2.1 milestone Oct 26, 2026

@erisu erisu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@GitToTheHub
GitToTheHub force-pushed the fix/statusbar-test-readiness branch from 92731d3 to b91e2b1 Compare November 10, 2026 16:17
@GitToTheHub
GitToTheHub merged commit f9175c3 into apache:master Nov 11, 2026
35 of 37 checks passed
@GitToTheHub
GitToTheHub deleted the fix/statusbar-test-readiness branch November 11, 2026 16:23
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.

4 participants