import { ToastrModule } from 'ngx-toastr';
import { of } from 'rxjs';
-import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
+import { configureTestBed } from '../../../../testing/unit-test-helper';
import { CoreModule } from '../../../core/core.module';
import { HostService } from '../../../shared/api/host.service';
+ import { ActionLabels } from '../../../shared/constants/app.constants';
+ import { CdTableAction } from '../../../shared/models/cd-table-action';
import { Permissions } from '../../../shared/models/permissions';
import { AuthStorageService } from '../../../shared/services/auth-storage.service';
import { SharedModule } from '../../../shared/shared.module';
);
expect(spans[0].textContent).toBe(hostname);
});
- }));
+ });
- describe('getEditDisableDesc', () => {
- it('should return message (not managed by Orchestrator)', () => {
+ describe('test edit button', () => {
+ let tableAction: CdTableAction;
+
+ beforeEach(() => {
+ tableAction = _.find(component.tableActions, { name: ActionLabels.EDIT });
+ });
+
+ it('should disable button and return message (not managed by Orchestrator)', () => {
component.selection.add({
sources: {
ceph: true,