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

Niloofar Sadeghi / Refactor tests in the network-status.spec.tsx file #7230

Conversation

niloofar-deriv
Copy link
Contributor

@niloofar-deriv niloofar-deriv commented Dec 23, 2022

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 Dec 23, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
deriv-app ✅ Ready (Inspect) Visit Preview Jan 1, 2023 at 8:57AM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Dec 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/7230](https://github.com/binary-com/deriv-app/pull/7230)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-niloo-fs-niloofar-83404tests-for-netw-09598f.binary.sx?qa_server=frontend.binaryws.com&app_id=31583
    - **Original**: https://deriv-app-git-fork-niloo-fs-niloofar-83404tests-for-netw-09598f.binary.sx
- **App ID**: `31583`

@codecov-commenter
Copy link

codecov-commenter commented Dec 23, 2022

Codecov Report

Merging #7230 (3f88f03) into develop (c743761) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #7230   +/-   ##
========================================
  Coverage    19.40%   19.41%           
========================================
  Files         1478     1478           
  Lines        34569    34569           
  Branches      6366     6366           
========================================
+ Hits          6709     6711    +2     
+ Misses       27349    27348    -1     
+ Partials       511      510    -1     
Impacted Files Coverage Δ
...ages/components/src/components/popover/popover.tsx 0.00% <ø> (ø)
...rc/App/Components/Layout/Footer/network-status.jsx 85.71% <ø> (+28.57%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

render(<NetworkStatus status={status} is_mobile />);
const divElement = screen.getByTestId('dt_network_status_id');
expect(divElement).toHaveClass('network-status__wrapper--is-mobile');
rerender(<NetworkStatus status={{ class: 'online' }} />);
Copy link
Member

Choose a reason for hiding this comment

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

why do you need to run rerender on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank u @ali-hosseini-fs for your revision
I'm passing different props in each render because of that I rerender the component

packages/core/package.json Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Jan 1, 2023

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
No Duplication information No Duplication information

@farrah-deriv farrah-deriv merged commit 773ece1 into binary-com:develop Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants