Skip to content

test: [M3-7517 & M3-7519] - Cypress integration tests for Child -> Parent and Child -> Child account switching - #10288

Merged
jdamore-linode merged 11 commits into
linode:developfrom
jdamore-linode:M3-7517-cypress-account-switching-child-to-parent
Mar 21, 2024
Merged

jdamore-linode merged 11 commits into
linode:developfrom
jdamore-linode:M3-7517-cypress-account-switching-child-to-parent

Conversation

@jdamore-linode

Copy link
Copy Markdown
Contributor

Description 📝

Adds a couple Cypress tests to test the account switching for Parent -> Child and Child -> Child flows. Additionally makes some fixes and improvements to the existing tests (especially mocks) to resolve some inaccuracies.

I opted to only test these flows from the billing page to cut back on tests required (essentially for the sake of our Cypress Cloud usage) -- my thought is we already have the existing test to cover using the user menu to initiate the flow, but I'm happy to budge on this if there are any thoughts, objections, etc.

Changes 🔄

List any change relevant to the reviewer.

  • Adds Child -> Parent account switching test
  • Adds Child -> Child account switching test
  • Fixes various shortcomings with our existing Parent -> Child account switching tests

Target release date 🗓️

N/A

How to test 🧪

I recommend reviewing these tests using Cypress's debugger (via yarn cy:debug) so you can see them in action and observe any details, etc. that might stand out.

Alternatively, you can run the test from the command line:

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

yarn cy:run -s "cypress/e2e/core/parentChild/account-switching.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

mockAlternateChildAccountToken.expiry!,
mockAlternateChildAccountToken.scopes
);
// TODO Confirm whether toast is intended here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wanted to call this out: do we expect a toast notification to appear when switching from a Child account to another Child account? Seems like proxy_user doesn't get reset in local storage

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jdamore-linode Yea that's a good callout. I'll track this in a new ticket!

@jdamore-linode
jdamore-linode requested a review from a team as a code owner March 14, 2024 21:15
@jdamore-linode
jdamore-linode requested review from dwiley-akamai and hana-akamai and removed request for a team March 14, 2024 21:15
@github-actions

github-actions Bot commented Mar 14, 2024 •

Copy link
Copy Markdown

Coverage Report: ✅
Base Coverage: 81.45%
Current Coverage: 81.45%

@jaalah-akamai jaalah-akamai added the Approved Multiple approvals and ready to merge! label Mar 19, 2024

@dwiley-akamai dwiley-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The flow looked good to me 🚢

Screenshot 2024-03-19 at 12 45 12 PM

@mjac0bs mjac0bs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read through this spec and I think this is well covered, thank you, Joe!

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.

5 participants