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

[FEQ]Yaswanth/FEQ-1980 Added test cases for toggle switch component #138

Conversation

yaswanth-deriv
Copy link
Contributor

@yaswanth-deriv yaswanth-deriv commented Mar 22, 2024

changes:

  • refactored ToggleSwitch:

    1. added internal state for isChecked . its default value can be controlled from outside using value props.
    2. added internal ClickHandler to control the state internally. you can still pass onChange if you need to perform further actions when switching
  • Added test cases for toggle switch component in deriv-com/ui library

@yaswanth-deriv yaswanth-deriv marked this pull request as draft March 25, 2024 06:29
@yaswanth-deriv yaswanth-deriv marked this pull request as ready for review March 26, 2024 07:53
@coveralls
Copy link

coveralls commented Mar 26, 2024

Pull Request Test Coverage Report for Build 8504560612

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.8%) to 88.724%

Totals Coverage Status
Change from base Build 8433454510: 1.8%
Covered Lines: 146
Relevant Lines: 153

💛 - Coveralls

Copy link
Contributor Author

@yaswanth-deriv yaswanth-deriv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shayan-deriv shayan-deriv merged commit eedfbaa into deriv-com:main Apr 1, 2024
2 checks passed
Copy link

github-actions bot commented Apr 1, 2024

🎉 This PR is included in version 1.12.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

@yaswanth-deriv yaswanth-deriv deleted the yaswanth/FEQ-1980_Added_test_for_toogleswitch_component branch April 1, 2024 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants