mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
ACS-8824 [ACA] View Details / The user cannot edit node properties af… (#10246)
* ACS-8824 [ACA] View Details / The user cannot edit node properties after failing to change node name with special characters * ACS-8824 [ACA] View Details / The user cannot edit node properties after failing to change node name with special characters
This commit is contained in:
committed by
GitHub
parent
602460c574
commit
da44b4cee0
@@ -581,7 +581,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
expect(cardViewUpdateService.update).toHaveBeenCalledWith(property, 'updated-value');
|
||||
});
|
||||
|
||||
it('should trigger the update event if the editedValue is NOT valid', async () => {
|
||||
it('should NOT trigger the update event if the editedValue is invalid', async () => {
|
||||
const cardViewUpdateService = TestBed.inject(CardViewUpdateService);
|
||||
spyOn(cardViewUpdateService, 'update');
|
||||
component.property.isValid = () => false;
|
||||
@@ -589,7 +589,7 @@ describe('CardViewTextItemComponent', () => {
|
||||
updateTextField(component.property.key, '@invalid-value');
|
||||
await fixture.whenStable();
|
||||
|
||||
expect(cardViewUpdateService.update).toHaveBeenCalled();
|
||||
expect(cardViewUpdateService.update).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should trigger the update event if the editedValue is valid', async () => {
|
||||
|
@@ -149,7 +149,6 @@ export class CardViewTextItemComponent extends BaseCardView<CardViewTextItemMode
|
||||
this.cardViewUpdateService.update({ ...this.property } as CardViewTextItemModel, this.property.value);
|
||||
} else {
|
||||
this.errors = this.property.getValidationErrors(this.editedValue);
|
||||
this.cardViewUpdateService.update({ ...this.property } as CardViewTextItemModel, this.editedValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user