mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
fix eslint warnigs for core project (#7506)
This commit is contained in:
@@ -904,28 +904,28 @@ describe('CardViewTextItemComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
function updateTextField(key, value) {
|
||||
const updateTextField = (key, value) => {
|
||||
const editInput = fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-value-${key}"]`));
|
||||
editInput.nativeElement.value = value;
|
||||
editInput.nativeElement.dispatchEvent(new Event('input'));
|
||||
fixture.detectChanges();
|
||||
}
|
||||
};
|
||||
|
||||
function getTextFieldValue(key): string {
|
||||
const getTextFieldValue = (key): string => {
|
||||
const textItemInput = fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-value-${key}"]`));
|
||||
expect(textItemInput).not.toBeNull();
|
||||
return textItemInput.nativeElement.value;
|
||||
}
|
||||
};
|
||||
|
||||
function getTextField(key): DebugElement {
|
||||
const getTextField = (key): DebugElement => {
|
||||
const textItemInput = fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-value-${key}"]`));
|
||||
expect(textItemInput).not.toBeNull();
|
||||
return textItemInput;
|
||||
}
|
||||
};
|
||||
|
||||
function getTextFieldError(key): string {
|
||||
const getTextFieldError = (key): string => {
|
||||
const textItemInputError = fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-error-${key}"] li`));
|
||||
expect(textItemInputError).not.toBeNull();
|
||||
return textItemInputError.nativeElement.innerText;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
@@ -132,7 +132,7 @@ export class CardViewTextItemComponent extends BaseCardView<CardViewTextItemMode
|
||||
update(): void {
|
||||
if (this.property.isValid(this.editedValue)) {
|
||||
this.property.value = this.prepareValueForUpload(this.property, this.editedValue);
|
||||
this.cardViewUpdateService.update(<CardViewTextItemModel> { ...this.property }, this.property.value);
|
||||
this.cardViewUpdateService.update({ ...this.property } as CardViewTextItemModel, this.property.value);
|
||||
this.resetErrorMessages();
|
||||
} else {
|
||||
this.errors = this.property.getValidationErrors(this.editedValue);
|
||||
|
Reference in New Issue
Block a user