Skip to content

Commit

Permalink
Disable tenant popup (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Ruiz Becerra <[email protected]>
  • Loading branch information
2 people authored and yenienserrano committed Jun 12, 2023
1 parent 253e700 commit 9128e4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/apps/account/account-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export async function setupTopNavButton(coreStart: CoreStart, config: ClientConf
}
}

setShouldShowTenantPopup(shouldShowTenantPopup);
setShouldShowTenantPopup(false);

coreStart.chrome.navControls.registerRight({
// Pin to rightmost, since newsfeed plugin is using 1000, here needs a number > 1000
Expand Down
4 changes: 2 additions & 2 deletions public/apps/account/test/account-app.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ describe('Account app', () => {
});
});

it('Should show tenant selection popup when neither securitytenant in url nor saved tenant', (done) => {
it('Should not show tenant selection popup', (done) => {
(getSavedTenant as jest.Mock).mockReturnValueOnce(null);

setupTopNavButton(mockCoreStart, mockConfig as any);

process.nextTick(() => {
expect(getSavedTenant).toBeCalledTimes(1);
expect(setShouldShowTenantPopup).toBeCalledWith(true);
expect(setShouldShowTenantPopup).toBeCalledWith(false);
done();
});
});
Expand Down

0 comments on commit 9128e4e

Please sign in to comment.