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-7498] - Add Cypress tests for Parent/Child billing page UX enhancements #10070

Merged
merged 10 commits into from
Jan 19, 2024

Conversation

jdamore-linode
Copy link
Contributor

Description 📝

Adds Cypress tests to cover the UX enhancements made to the account Billing page for restricted and child users. Additionally updates Vitest and enables a Parent/Child unit test that was disabled due to an issue in older Vitest versions.

Changes 🔄

  • Upgrades Vitest from v1.0.4 to v1.2.0
  • Enables commented out unit test in ContactInformation.test.tsx
  • Adds Cypress tests to cover UX enhancements made to billing page for Parent/Child Account project
    • Confirms action buttons are disabled for restricted and child users
    • Confirms action buttons are enabled for parent and regular users

How to test 🧪

We should be able to rely on automated tests for this PR. Refer to the instructions below if you'd like to run the tests locally, however:

Prerequisites

Build and serve a Cloud Manager production build

yarn && yarn build && yarn start:manager:ci

Verification steps

  1. Verify unit test change:

    yarn test ContactInformation.test
  2. Verify Cypress test additions:

    yarn cy:run -s "cypress/e2e/core/billing/restricted-user-billing.spec.ts"

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

*
* @param tooltipText - Expected tooltip message to be shown to the user.
*/
const assertAddPaymentMethodDisabled = (tooltipText: string) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jaalah-akamai quick question occurred to me while writing these tests: should the payment method action menus (or their items) be disabled for restricted and child users?

Screenshot 2024-01-17 at 12 53 47 PM

Copy link
Contributor

@jaalah-akamai jaalah-akamai Jan 17, 2024

Choose a reason for hiding this comment

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

Yes! Edit: Well let me triple check this.
Edit edit: 100% yes!

@jdamore-linode
Copy link
Contributor Author

Just a note that I may add a temporary throw statement to an unrelated Cypress test and use this PR to test some e2e pipeline changes I'm working on -- please disregard if you review this PR while this is present

Copy link

github-actions bot commented Jan 17, 2024

Coverage Report:
Base Coverage: 79.92%
Current Coverage: 79.93%

@bnussman-akamai bnussman-akamai added the Add'tl Approval Needed Waiting on another approval! label Jan 18, 2024
Copy link
Contributor

@jaalah-akamai jaalah-akamai left a comment

Choose a reason for hiding this comment

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

Approved pending E2E for disabled action menu items 👍

@jaalah-akamai jaalah-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Jan 18, 2024
@jdamore-linode jdamore-linode merged commit e4e38f9 into linode:develop Jan 19, 2024
18 checks passed
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! Parent / Child Account
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants