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

Amina/test_coverage for icon_message_list in account package #5097

Merged
merged 8 commits into from
Apr 14, 2022

Conversation

amina-deriv
Copy link
Contributor

Changes:

Please include a summary of the change and which issue is fixed below:

When you need to add unit test

  • If this change disrupt current flow
  • If this change is adding new flow

When you need to add integration test

  • If components from external libraries are being used to define the flow, e.g. @deriv/components
  • If it relies on a very specific set of props with no default behavior for the current component.

Test coverage checklist (for reviewer)

  • Ensure utility / function has a test case
  • Ensure all the tests are passing

Type of change

  • Bug fix
  • New feature
  • Update feature
  • Refactor code
  • Translation to code
  • Translation to crowdin
  • Script configuration
  • Improve performance
  • Style only
  • Dependency update
  • Documentation update
  • Release

@vercel
Copy link

vercel bot commented Mar 23, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/deriv/deriv-app/2NoJdeKX3dMPqdz4gHt2b8beJMDe
✅ Preview: https://deriv-app-git-fork-amina-deriv-icon-message-list-spc.binary.sx

@github-actions
Copy link
Contributor

github-actions bot commented Mar 23, 2022

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/binary-com/deriv-app/pull/5097](https://github.com/binary-com/deriv-app/pull/5097)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-amina-deriv-icon-message-list-spc.binary.sx?qa_server=frontend.binaryws.com&app_id=24056
    - **Original**: https://deriv-app-git-fork-amina-deriv-icon-message-list-spc.binary.sx
- **App ID**: `24056`

it('when the length of message_list is less than 3, it should show messages with icon ', () => {
render(<IconMessageList message_list={['Sample Text1', 'Sample Text2']} />);
expect(screen.getByText(/Sample Text1/i)).toBeInTheDocument();
expect(screen.getByText(/Sample Text2/i)).toBeInTheDocument();
Copy link
Contributor

@ashraf-deriv ashraf-deriv Mar 24, 2022

Choose a reason for hiding this comment

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

What about check the availability of 'IcCloseCircle' icon also here ? I think it would increase the code coverage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.. Thanks for the suggestion

screen.getByRole('button', {
name: /show more/i,
})
).toBeInTheDocument();
Copy link
Contributor

Choose a reason for hiding this comment

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

What about checking 'show less' button is not present in the document?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@sonarcloud
Copy link

sonarcloud bot commented Apr 14, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
3.0% 3.0% Duplication

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.

5 participants