mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
fix "ng lint" command (#5012)
* update to latest js-api * fix the "ng lint" command * fix linting issues * fix lint issues * lint fixes * code fixes * fix html * fix html * update tests * test fixes * update tests * fix tests and api * fix code
This commit is contained in:
committed by
Eugenio Romano
parent
140c64b79f
commit
edc0945f39
@@ -56,7 +56,7 @@ describe('TaskAttachmentList', () => {
|
||||
{ name: 'FakeName-2', lastUpdatedByFullName: 'FakeUser-2', lastUpdated: '2017-01-03' }
|
||||
]));
|
||||
|
||||
component.ngOnChanges({});
|
||||
component.ngOnChanges();
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, Input, OnChanges, SimpleChanges, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, Input, OnChanges, ViewEncapsulation } from '@angular/core';
|
||||
import { FormService } from './../services/form.service';
|
||||
|
||||
@Component({
|
||||
@@ -33,7 +33,7 @@ export class FormListComponent implements OnChanges {
|
||||
constructor(protected formService: FormService) {
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
ngOnChanges() {
|
||||
this.getForms();
|
||||
}
|
||||
|
||||
|
@@ -195,7 +195,7 @@ describe('ContentWidgetComponent', () => {
|
||||
const change = new SimpleChange(null, contentId, true);
|
||||
component.ngOnChanges({ 'id': change });
|
||||
|
||||
component.contentLoaded.subscribe((res) => {
|
||||
component.contentLoaded.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable()
|
||||
.then(() => {
|
||||
|
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
import { ValidateFormFieldEvent } from './../../../events/validate-form-field.event';
|
||||
import { ValidateFormEvent } from './../../../events/validate-form.event';
|
||||
import { FormService } from './../../../services/form.service';
|
||||
import { ContainerModel } from './container.model';
|
||||
import { FormFieldTypes } from './form-field-types';
|
||||
@@ -298,7 +297,7 @@ describe('FormModel', () => {
|
||||
|
||||
let validated = false;
|
||||
|
||||
formService.validateForm.subscribe((event: ValidateFormEvent) => {
|
||||
formService.validateForm.subscribe(() => {
|
||||
validated = true;
|
||||
});
|
||||
|
||||
@@ -316,7 +315,7 @@ describe('FormModel', () => {
|
||||
|
||||
let validated = false;
|
||||
|
||||
formService.validateFormField.subscribe((event: ValidateFormFieldEvent) => {
|
||||
formService.validateFormField.subscribe(() => {
|
||||
validated = true;
|
||||
});
|
||||
|
||||
@@ -333,7 +332,7 @@ describe('FormModel', () => {
|
||||
|
||||
let validated = false;
|
||||
|
||||
formService.validateFormField.subscribe((event: ValidateFormFieldEvent) => {
|
||||
formService.validateFormField.subscribe(() => {
|
||||
validated = true;
|
||||
});
|
||||
|
||||
@@ -385,10 +384,10 @@ describe('FormModel', () => {
|
||||
spyOn(form, 'getFormFields').and.returnValue([testField]);
|
||||
|
||||
const validator = <FormFieldValidator> {
|
||||
isSupported(field: FormFieldModel): boolean {
|
||||
isSupported(): boolean {
|
||||
return true;
|
||||
},
|
||||
validate(field: FormFieldModel): boolean {
|
||||
validate(): boolean {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
@@ -60,10 +60,10 @@ describe('RowEditorComponent', () => {
|
||||
spyOn(component.table, 'validateRow').and.returnValue(
|
||||
<DynamicRowValidationSummary> {isValid: true, message: null}
|
||||
);
|
||||
component.save.subscribe((e) => {
|
||||
expect(e.table).toBe(component.table);
|
||||
expect(e.row).toBe(component.row);
|
||||
expect(e.column).toBe(component.column);
|
||||
component.save.subscribe((event) => {
|
||||
expect(event.table).toBe(component.table);
|
||||
expect(event.row).toBe(component.row);
|
||||
expect(event.column).toBe(component.column);
|
||||
done();
|
||||
});
|
||||
component.onSaveChanges();
|
||||
@@ -74,7 +74,7 @@ describe('RowEditorComponent', () => {
|
||||
<DynamicRowValidationSummary> {isValid: false, message: 'error'}
|
||||
);
|
||||
let raised = false;
|
||||
component.save.subscribe((e) => raised = true);
|
||||
component.save.subscribe(() => raised = true);
|
||||
component.onSaveChanges();
|
||||
expect(raised).toBeFalsy();
|
||||
});
|
||||
|
@@ -179,7 +179,7 @@ describe('RadioButtonsWidgetComponent', () => {
|
||||
expect(element.querySelector('#radio-id')).not.toBeNull();
|
||||
expect(option).not.toBeNull();
|
||||
option.click();
|
||||
widget.fieldChanged.subscribe((field) => {
|
||||
widget.fieldChanged.subscribe(() => {
|
||||
expect(element.querySelector('#radio-id')).toBeNull();
|
||||
expect(element.querySelector('#radio-id-opt-1-input')).toBeNull();
|
||||
});
|
||||
|
@@ -126,7 +126,7 @@ describe('TabsWidgetComponent', () => {
|
||||
|
||||
tick(500);
|
||||
|
||||
tabWidgetComponent.formTabChanged.subscribe((res) => {
|
||||
tabWidgetComponent.formTabChanged.subscribe(() => {
|
||||
tabWidgetComponent.tabs[1].isVisible = true;
|
||||
|
||||
tick(500);
|
||||
@@ -144,7 +144,7 @@ describe('TabsWidgetComponent', () => {
|
||||
|
||||
tick(500);
|
||||
|
||||
tabWidgetComponent.formTabChanged.subscribe((res) => {
|
||||
tabWidgetComponent.formTabChanged.subscribe(() => {
|
||||
tabWidgetComponent.tabs[0].isVisible = false;
|
||||
|
||||
tick(500);
|
||||
|
Reference in New Issue
Block a user