Skip to content
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

[Visual testing]: Add visual tests for KDropdownMenu #926

Open
AlexVelezLl opened this issue Feb 4, 2025 · 2 comments · May be fixed by #933
Open

[Visual testing]: Add visual tests for KDropdownMenu #926

AlexVelezLl opened this issue Feb 4, 2025 · 2 comments · May be fixed by #933
Assignees
Labels
Component: KDropdownMenu help wanted Open source contributors welcome type: task Something that needs to be done Visual testing

Comments

@AlexVelezLl
Copy link
Member

🌱 Are you new to the codebase? Welcome! Please see the contributing guidelines.

Context

We recently introduced a new visual testing system in KDS to prevent visual regressions and ensure UI consistency, and we want to start populating our KDS components with visual tests.

If you are not familiar yet with our visual testing system. Please refer to our Visual Testing Guide. You can also check the existing tests for KButton as an example.

Additionally, see the KDropdownMenu documentation for reference.

Desired behavior

KDropdownMenu should have visual tests to cover at least these snapshots:

  • KDropdownMenu with a single item
  • KDropdownMenu with multiple items
  • KDropdownMenu with items with icons (setting the hasIcons prop to true)
  • KDropdownMenu with header (using the header slot)

Note

Since we currently dont have a test file for KDropdownMenu. Please move the current KDropdownMenu.vue file to be a folder KDropdownMenu/index.vue and create the test file in KDropdownMenu/__tests__/KDropdownMenu.spec.js

Acceptance criteria

  • A new visual test suite is created for KDropdownMenu.
  • The test includes all required snapshots.
  • The test runs successfully and captures the expected snapshots.
@AlexVelezLl AlexVelezLl added Component: KDropdownMenu help wanted Open source contributors welcome type: task Something that needs to be done Visual testing labels Feb 4, 2025
@GautamBytes
Copy link

Hello @AlexVelezLl , I would like to contribute to this issue , would be grateful if can assign this to me. Looking forward to contribute!

@AlexVelezLl
Copy link
Member Author

Hey @GautamBytes! Thanks for your interest in contributing to Learning Equality! Sure thing! I will assign this to you :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: KDropdownMenu help wanted Open source contributors welcome type: task Something that needs to be done Visual testing
Projects
None yet
2 participants