mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-5540]lint fixes
This commit is contained in:
committed by
Anukriti Singh
parent
ff78d6495d
commit
ac9e8dd6db
+13
-9
@@ -77,16 +77,19 @@ describe('ContentMetadataComponent', () => {
|
||||
const findTagElements = (): DebugElement[] => fixture.debugElement.queryAll(By.css('.adf-metadata-properties .adf-metadata-properties-tag'));
|
||||
|
||||
const findCancelButton = (): HTMLButtonElement => fixture.debugElement.query(By.css('[data-automation-id=reset-metadata]')).nativeElement;
|
||||
const findCancelTagsButton = (): HTMLButtonElement => fixture.debugElement.query(By.css('[data-automation-id=reset-tags-metadata]')).nativeElement;
|
||||
const findCancelTagsButton = (): HTMLButtonElement =>
|
||||
fixture.debugElement.query(By.css('[data-automation-id=reset-tags-metadata]')).nativeElement;
|
||||
|
||||
const clickOnCancel = () => {
|
||||
findCancelButton().click();
|
||||
fixture.detectChanges();
|
||||
};
|
||||
|
||||
const findSaveGeneralInfoButton = (): HTMLButtonElement => fixture.debugElement.query(By.css('[data-automation-id=save-general-info-metadata]')).nativeElement;
|
||||
const findSaveGeneralInfoButton = (): HTMLButtonElement =>
|
||||
fixture.debugElement.query(By.css('[data-automation-id=save-general-info-metadata]')).nativeElement;
|
||||
const findSaveTagsButton = (): HTMLButtonElement => fixture.debugElement.query(By.css('[data-automation-id=save-tags-metadata]')).nativeElement;
|
||||
const findSaveCategoriesButton = (): HTMLButtonElement => fixture.debugElement.query(By.css('[data-automation-id=save-categories-metadata]')).nativeElement;
|
||||
const findSaveCategoriesButton = (): HTMLButtonElement =>
|
||||
fixture.debugElement.query(By.css('[data-automation-id=save-categories-metadata]')).nativeElement;
|
||||
|
||||
const clickOnGeneralInfoSave = () => {
|
||||
findSaveGeneralInfoButton().click();
|
||||
@@ -435,7 +438,8 @@ describe('ContentMetadataComponent', () => {
|
||||
describe('toggleEdit', () => {
|
||||
let mockEvent: MouseEvent;
|
||||
let mockGroup: CardViewGroup = {
|
||||
editable: false, expanded: false,
|
||||
editable: false,
|
||||
expanded: false,
|
||||
title: '',
|
||||
properties: []
|
||||
};
|
||||
@@ -443,7 +447,7 @@ describe('ContentMetadataComponent', () => {
|
||||
mockEvent = new MouseEvent('click');
|
||||
component.editableGroup = mockGroup;
|
||||
});
|
||||
|
||||
|
||||
it('should toggle General Info editing mode', () => {
|
||||
component.editable = false;
|
||||
component.toggleEdit(mockEvent, mockGroup, ButtonType.GeneralInfo);
|
||||
@@ -478,7 +482,7 @@ describe('ContentMetadataComponent', () => {
|
||||
expect(mockGroup.expanded).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
it('should show Snackbar when Editing Panel is Active', () => {
|
||||
spyOn(component, 'isEditingPanel').and.returnValue(true);
|
||||
spyOn(component, 'showSnackbar');
|
||||
@@ -509,7 +513,8 @@ describe('ContentMetadataComponent', () => {
|
||||
|
||||
it('should toggle group editable', () => {
|
||||
const group: CardViewGroup = {
|
||||
editable: false, expanded: false,
|
||||
editable: false,
|
||||
expanded: false,
|
||||
title: '',
|
||||
properties: []
|
||||
};
|
||||
@@ -661,7 +666,6 @@ describe('ContentMetadataComponent', () => {
|
||||
});
|
||||
|
||||
it('should hide card views group when the grouped properties are empty', async () => {
|
||||
|
||||
spyOn(contentMetadataService, 'getGroupedProperties').and.stub();
|
||||
|
||||
component.ngOnChanges({ node: new SimpleChange(node, expectedNode, false) });
|
||||
@@ -1384,7 +1388,7 @@ describe('ContentMetadataComponent', () => {
|
||||
expect(categoriesManagementComponent.disableRemoval).toBeFalse();
|
||||
});
|
||||
|
||||
it('should not disable removal if forkJoin fails',() => {
|
||||
it('should not disable removal if forkJoin fails', () => {
|
||||
const property = { key: 'properties.property-key', value: 'original-value' } as CardViewBaseItemModel;
|
||||
const expectedNode = { ...node, name: 'some-modified-value' };
|
||||
spyOn(nodesApiService, 'updateNode').and.returnValue(of(expectedNode));
|
||||
|
||||
Reference in New Issue
Block a user