Skip to content

Some additional accessibility test coverage #2823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jonathanmos
Copy link
Member

What does this PR do?

Adds some additional test coverage for accessibility around the logic for view reduction, and also minor code cleanup.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.92%. Comparing base (c6b7a43) to head (aedbf98).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2823      +/-   ##
===========================================
- Coverage    70.18%   69.92%   -0.26%     
===========================================
  Files          834      834              
  Lines        31296    31296              
  Branches      5259     5259              
===========================================
- Hits         21964    21883      -81     
- Misses        7883     7925      +42     
- Partials      1449     1488      +39     
Files with missing lines Coverage Δ
...kotlin/com/datadog/android/rum/RumConfiguration.kt 97.44% <ø> (ø)

... and 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonathanmos jonathanmos force-pushed the jmoskovich/additional-accessibilty-coverage branch from c26989a to aedbf98 Compare August 19, 2025 11:57
@jonathanmos jonathanmos marked this pull request as ready for review August 19, 2025 13:27
@jonathanmos jonathanmos requested review from a team as code owners August 19, 2025 13:27
// region accessibility

@Test
fun `M hasAccessibility false W write() { empty accessibility object }`(
Copy link
Member

Choose a reason for hiding this comment

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

I think there is a disconnect between RumViewScope (or AccessibilitySnapshotManager) and RumDataWriter leading to the existence of RumDataWriter.isAccessibilityPopulated method and following issues:

  • one may update DefaultAccessibilitySnapshotManager.latestSnapshot method if new properties are added, but forget to update RumDataWriter.isAccessibilityPopulated
  • the number of properties participating in DefaultAccessibilitySnapshotManager.latestSnapshot is not the same as in RumDataWriter.isAccessibilityPopulated, is it expected?
  • as a consequence of above, we have some properties which are not checked for the change in DefaultAccessibilitySnapshotManager.latestSnapshot, meaning we will always have hasAccessibility=true, isn't it?

Maybe we should simply return null from DefaultAccessibilitySnapshotManager.latestSnapshot if nothing changed? And rename this method somehow.

This would allow us to have better encapsulation and smaller change surface.

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.

3 participants