mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix random test failing part 2 (#3395)
* fix random failing test core search/comment/auth/user * fix node delete directive * fix lint issues * node restore fix * fix comment test * remove fdescribe * fix tests and tslint * fix upload test * unsubscribe success event task test * copy comment object during test * use the data pipe performance improvement and standard usage * uncomment random test * fix comment date random failing test * disposable unsubscribe * fix start process * remove fdescribe * change start process test and remove commented code * fix error event check double click * clone object form test * refactor date time test * fix service mock * fix test dropdown and context * git hook lint * fix language test * unsubscribe documentlist event test * fix disposable error * fix console log service error document list * unusbscribe search test * clear input field * remove wrong test
This commit is contained in:
committed by
Denys Vuika
parent
22006395c7
commit
eb0f91c5db
@@ -64,7 +64,7 @@ describe('CardViewBoolItemComponent', () => {
|
||||
expect(value).not.toBeNull();
|
||||
});
|
||||
|
||||
it('should NOT render the label and value if the property is NOT editable and doesn\'t have a proper boolean value set' , () => {
|
||||
it('should NOT render the label and value if the property is NOT editable and doesn\'t have a proper boolean value set', () => {
|
||||
component.editable = true;
|
||||
component.property.value = undefined;
|
||||
component.property.editable = false;
|
||||
@@ -77,7 +77,7 @@ describe('CardViewBoolItemComponent', () => {
|
||||
expect(value).toBeNull();
|
||||
});
|
||||
|
||||
it('should render the label and value if the property is NOT editable but has a proper boolean value set' , () => {
|
||||
it('should render the label and value if the property is NOT editable but has a proper boolean value set', () => {
|
||||
component.editable = true;
|
||||
component.property.value = false;
|
||||
component.property.editable = false;
|
||||
@@ -179,7 +179,7 @@ describe('CardViewBoolItemComponent', () => {
|
||||
const cardViewUpdateService = TestBed.get(CardViewUpdateService);
|
||||
spyOn(cardViewUpdateService, 'update');
|
||||
|
||||
component.changed(<MatCheckboxChange> {checked: true});
|
||||
component.changed(<MatCheckboxChange> { checked: true });
|
||||
|
||||
expect(cardViewUpdateService.update).toHaveBeenCalledWith(component.property, true);
|
||||
});
|
||||
@@ -187,7 +187,7 @@ describe('CardViewBoolItemComponent', () => {
|
||||
it('should update the property value after a changed', async(() => {
|
||||
component.property.value = true;
|
||||
|
||||
component.changed(<MatCheckboxChange> {checked: false});
|
||||
component.changed(<MatCheckboxChange> { checked: false });
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
expect(component.property.value).toBe(false);
|
||||
@@ -199,10 +199,11 @@ describe('CardViewBoolItemComponent', () => {
|
||||
component.property.value = false;
|
||||
fixture.detectChanges();
|
||||
|
||||
cardViewUpdateService.itemUpdated$.subscribe(
|
||||
let disposableUpdate = cardViewUpdateService.itemUpdated$.subscribe(
|
||||
(updateNotification) => {
|
||||
expect(updateNotification.target).toBe(component.property);
|
||||
expect(updateNotification.changed).toEqual({ boolkey: true });
|
||||
disposableUpdate.unsubscribe();
|
||||
done();
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user