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

test: [M3-8565] - Add unit tests for rest of NodeBalancers package #10945

Merged
merged 9 commits into from
Sep 18, 2024

Conversation

coliu-akamai
Copy link
Contributor

@coliu-akamai coliu-akamai commented Sep 16, 2024

Description πŸ“

  • Adds unit tests for the rest of NodeBalancers package to improve test coverage and confirm things render as expected

Target release date πŸ—“οΈ

n/a

How to test πŸ§ͺ

  • yarn test NodeBalancers - confirm all tests pass

As an Author I have considered πŸ€”

Check all that apply

  • πŸ‘€ Doing a self review
  • ❔ Our contribution guidelines
  • 🀏 Splitting feature into small PRs
  • βž• Adding a changeset
  • πŸ§ͺ Providing/Improving test coverage
  • πŸ” Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • πŸ‘£ Providing comprehensive reproduction steps
  • πŸ“‘ Providing or updating our documentation
  • πŸ•› Scheduling a pair reviewing session
  • πŸ“± Providing mobile support
  • β™Ώ Providing accessibility support

@coliu-akamai coliu-akamai self-assigned this Sep 16, 2024
@coliu-akamai coliu-akamai added Ready for Review Unit tests Improves unit test coverage labels Sep 16, 2024
@coliu-akamai coliu-akamai marked this pull request as ready for review September 16, 2024 17:25
@coliu-akamai coliu-akamai requested a review from a team as a code owner September 16, 2024 17:25
@coliu-akamai coliu-akamai requested review from dwiley-akamai and cpathipa and removed request for a team September 16, 2024 17:25
Copy link

github-actions bot commented Sep 16, 2024

Coverage Report: βœ…
Base Coverage: 86.64%
Current Coverage: 86.8%

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

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

Tests passed locally & in CI βœ…

  • there was a failure for nodebalancers/nodebalancers-create-in-complex-form.spec.ts -- worth looking into but it shouldn't have been caused by any of the changes in this PR

Screenshot 2024-09-16 at 1 59 14β€―PM

@@ -28,7 +28,7 @@ const node: NodeBalancerConfigNodeFields = {
weight: 100,
};

const props: NodeBalancerConfigPanelProps = {
export const nbConfigPanelMockPropsForTest: NodeBalancerConfigPanelProps = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to not stick with props for the variable name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I exported the props to use in NodeBalancerPassiveCheck.test.tsx - thought it might be helpful to mirror how we update the names of interfaces for component props to be more specific when exporting them, and avoid something like import { props } from file.

Can definitely change back to props though!

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh gotcha, in that case I agree with how you handled it originally here πŸ‘πŸΎ

coliu-akamai and others added 2 commits September 16, 2024 15:19
…Node.test.tsx

Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com>
….test.tsx

Co-authored-by: Dajahi Wiley <114682940+dwiley-akamai@users.noreply.github.com>
@coliu-akamai coliu-akamai added Add'tl Approval Needed Waiting on another approval! and removed Ready for Review labels Sep 16, 2024
@coliu-akamai
Copy link
Contributor Author

coliu-akamai commented Sep 16, 2024

This is weird... nodebalancers/nodebalancers-create-in-complex-form.spec.ts passes locally when I use yarn cy:debug, but not when I run it directly... gonna look into this a bit more!

probably something to do with this privacy policy/EU check - maybe sometimes a region from the EU is chosen which triggers this check? cc @jdamore-linode
image (sorry for the blurry photo, just screenshotted it from the outputted video)

Copy link
Contributor

@cpathipa cpathipa left a comment

Choose a reason for hiding this comment

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

@coliu-akamai Thank you for adding testing coverage for NodeBalancers.

@cpathipa cpathipa added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Sep 17, 2024
@coliu-akamai
Copy link
Contributor Author

created M3-8600 to look into the test flake for nodebalancers/nodebalancers-create-in-complex-form.spec.ts some more, separate from this pr. Will be merging this one in

@coliu-akamai coliu-akamai merged commit 75c5986 into linode:develop Sep 18, 2024
18 of 20 checks passed
@coliu-akamai coliu-akamai deleted the m3-8565 branch October 9, 2024 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Unit tests Improves unit test coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants