-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix:updated css to align checkbox and label to center in checkbox-widget #35133
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
WalkthroughThis update enhances the Checkbox widget in the web application by introducing comprehensive testing and improving its styling. A new suite of Cypress end-to-end tests validates both the functionality and visual alignment of the widget. Simultaneously, CSS modifications refine the checkbox's appearance, ensuring it aligns with design specifications while preserving its core functionality. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox2_spec.js (1 hunks)
- app/client/src/widgets/CheckboxWidget/component/index.tsx (1 hunks)
Files skipped from review due to trivial changes (1)
- app/client/src/widgets/CheckboxWidget/component/index.tsx
Additional context used
Path-based instructions (1)
app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox2_spec.js (1)
Pattern
app/client/cypress/**/**.*
: Review the following e2e test code written using the Cypress test library. Ensure that:
- Follow best practices for Cypress code and e2e automation.
- Avoid using cy.wait in code.
- Avoid using cy.pause in code.
- Avoid using agHelper.sleep().
- Use locator variables for locators and do not use plain strings.
- Use data-* attributes for selectors.
- Avoid Xpaths, Attributes and CSS path.
- Avoid selectors like .btn.submit or button[type=submit].
- Perform logins via API with LoginFromAPI.
- Perform logout via API with LogOutviaAPI.
- Perform signup via API with SignupFromAPI.
- Avoid using it.only.
- Avoid using after and aftereach in test cases.
- Use multiple assertions for expect statements.
- Avoid using strings for assertions.
- Do not use duplicate filenames even with different paths.
- Avoid using agHelper.Sleep, this.Sleep in any file in code.
Additional comments not posted (4)
app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox2_spec.js (4)
1-1
: Good use of import statement.The import statement is concise and follows best practices.
3-5
: Well-structured describe block.The describe block is well-defined and uses tags for better categorization.
7-9
: Good use of before hook.The before hook is correctly used to set up the initial state for the tests.
10-13
: Good test case for adding a new widget.The test case is well-defined and checks for the existence of the widget.
app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox2_spec.js
Outdated
Show resolved
Hide resolved
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox2_spec.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox2_spec.js
@abhishek-bandameedi Can you please explain why we need cypress here? We have seen there is change in src with style updation. This logic can be tested with Jest unit tests or React testing library. Cypress is redundant here. |
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/client/src/widgets/CheckboxWidget/component/index.test.tsx (1 hunks)
Additional comments not posted (4)
app/client/src/widgets/CheckboxWidget/component/index.test.tsx (4)
1-7
: Good use of necessary imports!The import statements are appropriate and required for rendering the component and testing its styles.
9-9
: Well-defined describe block!The describe block is correctly used to group related tests for the CheckboxComponent.
10-33
: Effective test case!The test case is well-written and effectively verifies that the align-items style is set to center for the CheckboxComponent.
1-34
: Overall, great job on the test file!The file is well-structured and the test case effectively verifies the CSS changes for the CheckboxComponent.
Updated unit tests |
This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected. |
before(() => { | ||
_.agHelper.AddDsl("emptyDSL"); | ||
}); | ||
it("Add new widget", () => { |
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.
Could you please help me understand the necessity of Cypress test cases in this context? I believe unit testing might be sufficient in this scenario.
Your insights would be appreciated.
This PR has been closed because of inactivity. |
Issue
Description:
Updated the alignment of checkbox and its label to center when the size of label is increased.
Screenshots:
Before:
After:
Summary by CodeRabbit
New Features
Improvements