From ac9e8dd6dbdd65e07c6ddb46b431b1783a0ebfe4 Mon Sep 17 00:00:00 2001 From: Yasa-Nataliya Date: Wed, 6 Sep 2023 13:51:00 +0530 Subject: [PATCH] [ACS-5540]lint fixes --- .../content-metadata.component.spec.ts | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.spec.ts b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.spec.ts index 0b375fb619..680e8c76ff 100644 --- a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.spec.ts +++ b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.spec.ts @@ -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));