test: [UIE-10395 & UIE-10444] - Fix Parent/Child account switching bugs and test failures#13470
Conversation
| : undefined, | ||
| }, | ||
| isIAMDelegationEnabled === false && isParentUserType | ||
| isIAMDelegationEnabled === false && (isParentUserType || isProxyUserType) |
There was a problem hiding this comment.
This aims to fix two test failures in account-switching.spec.ts:
- can switch from Proxy user back to Parent account user from Billing page
- can switch to another Child account as a Proxy user
This relates to a change made by #13430. It doesn't look like we have a case to fetch child accounts when signed in as a proxy user and I believe this addition addresses that, but hoping for a quick sanity check cc @abailly-akamai @aaleksee-akamai
| mockGetChildAccounts([]).as('getEmptySearchResults'); | ||
| cy.findByPlaceholderText('Search').click(); | ||
| cy.focused().type('Fake Name'); | ||
| cy.focused().type('Fake Name', { delay: 50 }); |
There was a problem hiding this comment.
This test seems to be flaky because Cypress manages to type "Fake Name" into the debounced search field faster than 250ms, apparently causing the handleSearchQueryChange handler not to execute and preventing the search request from firing.
As best I can tell via git bisect, this began occurring after merging PR #13318 but I have not been able to identify the specific change that triggered the flakiness. I also looked into recent changes to <DebouncedSearchField /> made in #13292 and believe I've ruled that out as the cause as well.
I don't think this can actually be reproduced outside of automation so I'm happy to work around it from within the test, but just noting what I've looked into in case anybody would like to continue examining this.
Cloud Manager UI test results🔺 1 failing test on test run #2 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: pnpm cy:run -s "cypress/e2e/core/objectStorage/object-storage.e2e.spec.ts" |
|||||||||||||||||
|
^ The search test that I'm trying to fix failed twice before finally passing, so I'll have to take a second look at that |
abailly-akamai
left a comment
There was a problem hiding this comment.
Thanks @jdamore-linode! Confirming this fixes the regression with the Switch Account Drawer for legacy Parent / Child accounts
Description 📝
This is a quick PR to fix the Cypress test failures we're seeing with the Parent/Child account switching tests.
Changes 🔄
Scope 🚢
Upon production release, changes in this PR will be visible to:
Target release date 🗓️
Next release (3/18?)
How to test 🧪
Prerequisites
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 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
As an Author, before moving this PR from Draft to Open, I confirmed ✅