Skip to content

Commit

Permalink
Disable "Shared spaces" column in saved object management table
Browse files Browse the repository at this point in the history
This column should not be shown until we at least have one saved
object type that is multi-namespace.
  • Loading branch information
jportner committed Aug 19, 2020
1 parent c35a1ad commit 10c1cbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ describe('ShareSavedObjectsToSpaceService', () => {
expect.any(ShareToSpaceSavedObjectsManagementAction)
);

expect(deps.savedObjectsManagementSetup.columns.register).toHaveBeenCalledTimes(1);
expect(deps.savedObjectsManagementSetup.columns.register).toHaveBeenCalledWith(
expect.any(ShareToSpaceSavedObjectsManagementColumn)
);
// expect(deps.savedObjectsManagementSetup.columns.register).toHaveBeenCalledTimes(1);
// expect(deps.savedObjectsManagementSetup.columns.register).toHaveBeenCalledWith(
// expect.any(ShareToSpaceSavedObjectsManagementColumn)
// );
expect(deps.savedObjectsManagementSetup.columns.register).not.toHaveBeenCalled(); // ensure this test fails after column code is uncommented
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ interface SetupDeps {
export class ShareSavedObjectsToSpaceService {
public setup({ spacesManager, savedObjectsManagementSetup, notificationsSetup }: SetupDeps) {
const action = new ShareToSpaceSavedObjectsManagementAction(spacesManager, notificationsSetup);
const column = new ShareToSpaceSavedObjectsManagementColumn(spacesManager);
savedObjectsManagementSetup.actions.register(action);
savedObjectsManagementSetup.columns.register(column);
// Note: this column is hidden for now because no saved objects are shareable. It should be uncommented when at least one saved object type is multi-namespace.
// const column = new ShareToSpaceSavedObjectsManagementColumn(spacesManager);
// savedObjectsManagementSetup.columns.register(column);
}
}

0 comments on commit 10c1cbc

Please sign in to comment.