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

fix: [M3-7747] - Fix Linode Migration dialog hidden $0 price #10166

Conversation

jdamore-linode
Copy link
Contributor

Description πŸ“

When migrating to or from a region with $0 pricing, the Linode migrate dialog hides the $0.00 price. This fixes the issue and adds some unit tests.

Changes πŸ”„

List any change relevant to the reviewer.

  • Adds unit tests for MigrationPricing component
  • Updates MigrationPricing logic to account for $0 pricing

Preview πŸ“·

Before After
To Zero Region Screenshot 2024-02-08 at 12 24 28 PM

How to test πŸ§ͺ

To run the new unit tests:

yarn test MigrationPricing.test

To run related Cypress tests:

yarn && yarn build && yarn start:manager:ci and then

yarn cy:run -s "cypress/e2e/core/firewalls/migrate-linode-with-firewall.spec.ts,cypress/e2e/core/linodes/migrate-linode.spec.ts"

Manual verification:

Using an account with access to es-mad, create a Linode in es-mad, wait for it to provision and boot, and then open the Migration dialog (via either the Linode landing page or details page). Confirm that after selecting a new region, the $0 price is displayed for Madrid.

Similarly, you can create a Linode in another region, open the Migration dialog, select Madrid for the new region, and confirm that $0 appears.

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

Copy link

github-actions bot commented Feb 8, 2024

Coverage Report: βœ…
Base Coverage: 81.12%
Current Coverage: 81.12%

Copy link
Contributor

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Good stuff, thank you!

Screenshot 2024-02-08 at 2 06 21 PM

@bnussman-akamai bnussman-akamai added Add'tl Approval Needed Waiting on another approval! and removed Ready for Review labels Feb 8, 2024
Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

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

βœ… Nice test coverage!
βœ… Migration from Spain shows $0 price to new price.
βœ… Migration to Spain shows old price to $0 price.
βœ… Backups price displays when backups are enabled on the linode and are $0 when the linode's region is Spain.

@mjac0bs mjac0bs added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Feb 8, 2024
@jdamore-linode jdamore-linode merged commit 466d3c5 into linode:develop Feb 9, 2024
18 checks passed
jdamore-linode added a commit to jdamore-linode/manager that referenced this pull request Feb 12, 2024
…10166)

* Add unit tests for MigrationPricing component

* Accounting for $0 prices in MigrationPricing component
jdamore-linode added a commit that referenced this pull request Feb 12, 2024
…xes for release (#10177)

* fix: [M3-7741] - Hide error notices for $0 regions in Resize Pool and Add a Node Pool drawers (#10157)

* Allow -zsh LKE prices without error notices in Resize Pool and Add Pool drawers

* Fix loading spinner displaying above what was supposed to be loading

* Fix conditional to render notice if either price is invalid

* Add test coverage

* Added changeset: Hide error notices for /bin/sh regions for LKE Resize and Add Node Pools

* Fix changeset wording

* Address feedback: use invalid price util

* fix: [M3-7746] - Fix $0 region price error in "Enable All Backups" drawer (#10161)

* Remove error indicator for Linodes in $0 regions

* Fix $0 total price display issue

* Cover $0 pricing cases in Cypress backup tests

* Add BackupLinodeRow tests to account for error states and $0 regions

* Add unit tests for BackupDrawer component

* fix: [M3-7747] - Fix Linode Migration dialog hidden $0 price (#10166)

* Add unit tests for MigrationPricing component

* Accounting for $0 prices in MigrationPricing component

* fix: [M3-7739] - Fix error when enabling backups for Linodes in regions with $0 price (#10153)

* Fix error when enabling backups for Linodes in regions with $0 price

* Add unit tests for EnableBackupsDialog

---------

Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>

* Replace "toBeDisabled" with "toHaveAttribute" assertion

---------

Co-authored-by: Mariah Jacobs <114685994+mjac0bs@users.noreply.github.com>
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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants