Skip to content

Commit

Permalink
Add selector on service accounts page
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho committed Apr 3, 2024
1 parent 0a0af00 commit 9fd747e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions public/apps/configuration/panels/service-account-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ import { ExternalLink, tableItemsUIProps, truncatedListView } from '../utils/dis
import { getUserList, InternalUsersListing } from '../utils/internal-user-list-utils';
import { showTableStatusMessage } from '../utils/loading-spinner-utils';
import { buildHashUrl } from '../utils/url-builder';
import { LocalCluster } from '../app-router';
import { SecurityPluginTopNavMenu } from '../top-nav-menu';

export function dictView(items: Dictionary<string>) {
if (isEmpty(items)) {
Expand Down Expand Up @@ -159,6 +161,12 @@ export function ServiceAccountList(props: AppDependencies) {

return (
<>
<SecurityPluginTopNavMenu

Check failure on line 164 in public/apps/configuration/panels/service-account-list.tsx

View workflow job for this annotation

GitHub Actions / Run unit tests (ubuntu-latest)

Insert `··`

Check failure on line 164 in public/apps/configuration/panels/service-account-list.tsx

View workflow job for this annotation

GitHub Actions / Run unit tests (macos-latest)

Insert `··`

Check failure on line 164 in public/apps/configuration/panels/service-account-list.tsx

View workflow job for this annotation

GitHub Actions / Run unit tests (windows-latest)

Insert `··`
{...props}
dataSourcePickerReadOnly={true}
setDataSource={() => {}}
selectedDataSource={LocalCluster}
/>
<EuiPageHeader>
<EuiTitle size="l">
<h1>Service accounts</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,17 @@ describe('Multi-datasources enabled', () => {
cy.get('[data-test-subj="dataSourceViewContextMenuHeaderLink"]').should('be.disabled');
});

it('Checks Service Accounts Tab', () => {
// Datasource is locked to local cluster for tenancy tab
cy.visit('http://localhost:5601/app/security-dashboards-plugin#/serviceAccounts');
cy.contains('h1', 'Multi-tenancy');
cy.get('[data-test-subj="dataSourceViewContextMenuHeaderLink"]').should(
'contain',
'Local cluster'
);
cy.get('[data-test-subj="dataSourceViewContextMenuHeaderLink"]').should('be.disabled');
});

it('Checks Audit Logs Tab', () => {
cy.visit('http://localhost:5601/app/security-dashboards-plugin#/auditLogging');
cy.get('[data-test-subj="general-settings"]').should('exist');
Expand Down

0 comments on commit 9fd747e

Please sign in to comment.