-
Notifications
You must be signed in to change notification settings - Fork 3
chore(toggle): added screenshot tests (#DS-4293) #1088
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
Conversation
|
@rmnturov необходимо посмотреть только скриншоты |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the toggle component's hover state handling by introducing a reusable KbqHovered directive from the core library. The main improvements include better hover state management through a host directive and improved CSS selectors for more robust styling.
- Adds a new
KbqHovereddirective to handle hover states declaratively - Updates toggle component to use the new directive via
hostDirectives - Refactors SCSS to use more specific
:has()pseudo-class selectors for conditional styling - Adds comprehensive E2E tests with screenshots for toggle states and variations
Reviewed Changes
Copilot reviewed 9 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/components/core/common-behaviors/hovered.ts | New directive that manages hover state using RxJS and applies kbq-hovered class |
| packages/components/core/common-behaviors/hovered.spec.ts | Test coverage for the new KbqHovered directive |
| packages/components/toggle/toggle.component.ts | Integrates KbqHovered as a host directive |
| packages/components/toggle/toggle.scss | Refactors CSS selectors to use :has() with label presence checks |
| packages/components/toggle/_toggle-theme.scss | Updates hover styles to support both native :hover and .kbq-hovered class |
| packages/components/toggle/toggle-tokens.scss | Removes unused vertical padding token |
| packages/components-dev/e2e/components/toggle.ts | Adds E2E test components for toggle states and text/caption variations |
| packages/components-dev/e2e/components/toggle.playwright-spec.ts | Adds Playwright tests including screenshot tests |
| packages/components-dev/e2e/template.html | Adds toggle test components to E2E template |
| packages/components-dev/e2e/module.ts | Imports new toggle test components |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Visit the preview URL for this PR (updated for commit 47862df): https://koobiq-next--prs-1088-h3ioex01.web.app (expires Thu, 06 Nov 2025 11:11:59 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
|
баг превратился в фичу... как ранее договаривались в фиксе не должно быть ничего лишнего. |
так и есть - #1087 скриншот тесты добавил отдельным пром |
4b877db to
39f00a8
Compare
#1087