Skip to content

[UIK-3788]/unit tests#2939

Open
Valeria-Zimnitskaya wants to merge 26 commits into
release/v17from
UIK-3788/unit-tests
Open

[UIK-3788]/unit tests#2939
Valeria-Zimnitskaya wants to merge 26 commits into
release/v17from
UIK-3788/unit-tests

Conversation

@Valeria-Zimnitskaya

@Valeria-Zimnitskaya Valeria-Zimnitskaya commented May 21, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

This PR does not change production component behavior. The changes are focused on unit tests, shared test helpers, CI setup, and test documentation.

Summary

Main changes:

  • Added shared data-ui-name unit test coverage for many components.
  • Replaced old generic shared tests for className and ref with a narrower shouldHaveDataUiName helper.
  • Replaced direct DOM click usage in unit tests with Testing Library/user-event interactions where possible, so tests behave closer to real user actions.
  • Moved generic root behavior checks to core tests, where this behavior is actually implemented.
  • Added a unit test coverage map to document which component contracts are covered and which ones need local tests.
  • Added a small canvas mock for JSDOM, so components that measure text do not print canvas.getContext errors during unit tests.
  • Added core utility tests for accessible name and label detection helpers.
  • Cleaned up several unit tests to reduce noisy React/JSDOM warnings and make tests closer to real user behavior.

CI and test setup

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Nice improve.

Checklist:

  • I have updated the documentation accordingly.
  • I have added new tests on added of fixed functionality.

@Valeria-Zimnitskaya

Copy link
Copy Markdown
Contributor Author

@ilyabrower could you review please
Also i fixed here setup for NVDA but i need help with Build(?) nvda - they fail https://github.com/semrush/intergalactic/actions/runs/27132209994/job/80076217614?pr=2939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment