Skip to content

frontend : Added Stories and Snapshots for Layout Component #3358

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

IITI-tushar
Copy link

Refers: #931

Storybook Integration:

  • Added a new Storybook file, Layout.stories.tsx, to provide visual testing for the Layout component. It includes multiple stories showcasing different configurations, such as default, full-width, with custom content, and with error states.

Mock Implementation for Testing:

  • Introduced LayoutForStories.tsx, a simplified mock implementation of the Layout component for Storybook testing. This version eliminates Redux and API dependencies, making it easier to test the layout in isolation.

Codebase Refactoring:

  • Updated import paths in the Layout.tsx file to reflect the new directory structure after renaming and reorganizing files.

Snapshot Testing:

  • Added snapshot tests for various layout configurations, including default, full-width, custom content, error state, and multiple panels. These snapshots ensure consistent rendering of the Layout component in different scenarios.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 25, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: IITI-tushar
Once this PR has been reviewed and has the lgtm label, please assign joaquimrocha for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from illume and skoeva May 25, 2025 13:06
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 25, 2025
@illume
Copy link
Contributor

illume commented May 25, 2025

Nice work @IITI-tushar

There is an i18n CI check failing. npm run i18n to see what files need updating.

I didn't have a close look yet, but thought I'd mention that is how the failure can be addressed.

@IITI-tushar IITI-tushar force-pushed the feat-components/App/Layout branch from ce40af6 to 182ede8 Compare May 25, 2025 16:03
@IITI-tushar IITI-tushar force-pushed the feat-components/App/Layout branch from 182ede8 to bce8388 Compare May 25, 2025 16:03
@IITI-tushar
Copy link
Author

@illume
sir made some changes to i18next-parser-config.js.

now the npm run i18n ran without errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants