Skip to content

Commit 9065bc6

Browse files
test: [UIE-10395 & UIE-10444] - Fix Parent/Child account switching bugs and test failures (#13470)
* Fix bug preventing child accounts from being fetched when signed in as a proxy user * Work around debounce issue when searching for child accounts in test * Added changeset: Fix test flakiness in account switching spec
1 parent 07a5ee4 commit 9065bc6

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Tests
3+
---
4+
5+
Fix test flakiness in account switching spec ([#13470](https://github.com/linode/manager/pull/13470))

packages/manager/cypress/e2e/core/parentChild/account-switching.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ describe('Parent/Child account switching', () => {
366366
// Confirm no results message.
367367
mockGetChildAccounts([]).as('getEmptySearchResults');
368368
cy.findByPlaceholderText('Search').click();
369-
cy.focused().type('Fake Name');
369+
cy.focused().type('Fake Name', { delay: 50 });
370370
cy.wait('@getEmptySearchResults');
371371

372372
cy.contains(mockChildAccount.company).should('not.exist');
@@ -378,7 +378,7 @@ describe('Parent/Child account switching', () => {
378378
mockGetChildAccounts([mockChildAccount]).as('getSearchResults');
379379
cy.findByPlaceholderText('Search').click();
380380
cy.focused().clear();
381-
cy.focused().type(mockChildAccount.company);
381+
cy.focused().type(mockChildAccount.company, { delay: 50 });
382382
cy.wait('@getSearchResults');
383383

384384
cy.findByText(mockChildAccount.company).should('be.visible');

packages/manager/src/features/Account/SwitchAccountDrawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const SwitchAccountDrawer = (props: Props) => {
105105
}
106106
: undefined,
107107
},
108-
isIAMDelegationEnabled === false && isParentUserType
108+
isIAMDelegationEnabled === false && (isParentUserType || isProxyUserType)
109109
);
110110

111111
const {

0 commit comments

Comments
 (0)