Skip to content

test: Add Background component rendering contract tests-#1414#1716

Open
Rakshak05 wants to merge 4 commits into
utksh1:mainfrom
Rakshak05:issue-#1414
Open

test: Add Background component rendering contract tests-#1414#1716
Rakshak05 wants to merge 4 commits into
utksh1:mainfrom
Rakshak05:issue-#1414

Conversation

@Rakshak05

@Rakshak05 Rakshak05 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

This Pull Request introduces unit tests for the shared visual Background component to ensure its rendering and accessibility properties remain correct and robust.

Specifically, the following changes were made:

  • Modified the wrapper in Background.tsx to include aria-hidden="true", ensuring this purely decorative visual layer is hidden from assistive technologies.
  • Created Background.test.tsx containing contract tests that verify the component renders without crashing, correctly applies custom state modifiers (active, error, idle), asserts the decorative layers are hidden, and remains independent of animation timing.

Related Issues

Closes #1414

Type of Change

  • 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)
  • Documentation update

How Has This Been Tested?

We validated these changes by running the unit tests using Vitest in the frontend directory:
```powershell
npx vitest run testing/unit/components/Background.test.tsx

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

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.

[TEST] Add Background component rendering contract tests

1 participant