Add unit tests and Storybook stories for GTG heads-up banner components
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 383
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 77
Description
## Feature Description
Add comprehensive unit tests and Storybook stories for the Google Tag Gateway (GTG) heads-up banner and opt-out notice components that are being implemented in #11449. This includes testing component behavior, user interactions, tracking events, and dismissal logic.
The components that need test coverage are:
- `GoogleTagGatewayHeadsUpBanner` - Dashboard notification banner
- `GoogleTagGatewayOptOutNotice` - Settings screen notice for opt-out functionality
---------------
_Do not alter or remove anything below. The following sections will be managed by moderators only._
## Acceptance criteria
* Unit tests should cover all component functionality including conditional rendering, all user interactions.
* Unit tests should verify tracking events are fired correctly for all user interactions.
* Unit tests should test dismissal logic and cross-banner dismissal behavior.
* Unit tests should cover navigation logic and priority-based module settings routing.
* Unit tests should test opt-out persistence and server-side setting updates.
* Storybook stories should demonstrate all visual states and user interaction scenarios.
* Stories should cover different module connection combinations (Analytics, Ads, GTM).
* Stories should show both enabled and disabled states for all relevant conditions.
* Visual regression tests should be generated from the new stories.
* All tests should follow existing Site Kit testing patterns and conventions.
## Implementation Brief
* [ ]
### Test Coverage
*
## QA Brief
*
## Changelog entry
*
Contributor guide
Assessment
This issue has not been assessed yet.