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:
Eugenio Romano
2018-05-29 11:18:17 +02:00
committed by Denys Vuika
parent 22006395c7
commit eb0f91c5db
43 changed files with 4475 additions and 4332 deletions

View File

@@ -63,7 +63,7 @@ describe('CardViewDateItemComponent', () => {
});
it('should NOT render the default as value if the value is empty, editable:false and displayEmpty is false', () => {
component.property = new CardViewDateItemModel ({
component.property = new CardViewDateItemModel({
label: 'Date label',
value: '',
key: 'datekey',
@@ -81,7 +81,7 @@ describe('CardViewDateItemComponent', () => {
});
it('should render the default as value if the value is empty, editable:false and displayEmpty is true', () => {
component.property = new CardViewDateItemModel ({
component.property = new CardViewDateItemModel({
label: 'Date label',
value: '',
key: 'datekey',
@@ -99,7 +99,7 @@ describe('CardViewDateItemComponent', () => {
});
it('should render the default as value if the value is empty and editable:true', () => {
component.property = new CardViewDateItemModel ({
component.property = new CardViewDateItemModel({
label: 'Date label',
value: '',
key: 'datekey',
@@ -176,15 +176,16 @@ describe('CardViewDateItemComponent', () => {
const expectedDate = moment('Jul 10 2017', 'MMM DD YY');
fixture.detectChanges();
cardViewUpdateService.itemUpdated$.subscribe(
let disposableUpdate = cardViewUpdateService.itemUpdated$.subscribe(
(updateNotification) => {
expect(updateNotification.target).toBe(component.property);
expect(updateNotification.changed).toEqual({datekey: expectedDate.toDate()});
expect(updateNotification.changed).toEqual({ datekey: expectedDate.toDate() });
disposableUpdate.unsubscribe();
done();
}
);
component.onDateChanged({value: expectedDate});
component.onDateChanged({ value: expectedDate });
});
it('should update the propery\'s value after a succesful update attempt', async(() => {
@@ -194,7 +195,7 @@ describe('CardViewDateItemComponent', () => {
const expectedDate = moment('Jul 10 2017', 'MMM DD YY');
fixture.detectChanges();
component.onDateChanged({value: expectedDate});
component.onDateChanged({ value: expectedDate });
fixture.whenStable().then(
(updateNotification) => {