Skip to content
Snippets Groups Projects
Commit f65d747c authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Clean code

parent fb97373b
No related branches found
No related tags found
2 merge requests!29Develop,!8Resolve "Add tests for instance store module"
import { Observable } from 'rxjs';
import { ConeSearchEffects } from '../effects/cone-search.effects';
import { EffectsMetadata, getEffectsMetadata } from '@ngrx/effects';
import { ConeSearchService } from '../services/cone-search.service';
import { ToastrService } from 'ngx-toastr';
import { TestBed } from '@angular/core/testing';
import { provideMockActions } from '@ngrx/effects/testing';
import { criterionToString, stringToCriterion, getPrettyCriterion, getPrettyOperator } from './';
// import { criterionToString, getCriterionStr, getHost } from './criterion.model';
import {
FieldCriterion,
JsonCriterion,
......@@ -15,15 +7,7 @@ import {
Criterion,
ListCriterion
} from '.';
import { Attribute, Option, RendererConfig } from '../../../metamodel/models';
// import {
// BetweenCriterion,
// FieldCriterion,
// JsonCriterion,
// SelectMultipleCriterion,
// ListCriterion
// } from './criterion';
import { Attribute } from '../../../metamodel/models';
describe('CriterionModel', () => {
it('#criterionToString should convert criterion object to string', () => {
......@@ -206,20 +190,6 @@ describe('CriterionModel', () => {
expect(stringToCriterion(attribute)).toBeNull();
});
// id: 1,
// name: 'myAttribute',
// label: 'my attribute',
// form_label: 'My Attribute',
// output_display: 1,
// criteria_display: 1,
// search_type: 'field',
// operator: 'eq',
// type: 'field',
// min: 'one', // optional
// max: 'two', // optional
// display_detail: 1,
// options: [{ label: 'option1', value: 'one', display: 1 }, { label: 'option2', value: 'two', display: 2 }] // optional
it('#getPrettyCriterion should print criterion correctly', () => {
const fieldCriterion = { id: 1, type: 'field', operator: 'eq', value: 'value' } as FieldCriterion;
let expectedPrintedCriterion = '= value';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment