From 8a52e2b55a779777fc0047af75125650ac2427e5 Mon Sep 17 00:00:00 2001
From: Tifenn Guillas <tifenn.guillas@lam.fr>
Date: Mon, 25 Oct 2021 16:24:03 +0200
Subject: [PATCH] Clean code

---
 .../search-type/checkbox.component.spec.ts    | 29 +++++++++----------
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/client/src/app/instance/search/components/criteria/search-type/checkbox.component.spec.ts b/client/src/app/instance/search/components/criteria/search-type/checkbox.component.spec.ts
index b080f0ef..ed915471 100644
--- a/client/src/app/instance/search/components/criteria/search-type/checkbox.component.spec.ts
+++ b/client/src/app/instance/search/components/criteria/search-type/checkbox.component.spec.ts
@@ -2,8 +2,6 @@ import { Component, ViewChild } from '@angular/core';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
 
-import { NgSelectModule } from '@ng-select/ng-select';
-
 import { CheckboxComponent } from './checkbox.component';
 import { SelectMultipleCriterion } from '../../../../store/models/criterion';
 import { Option } from '../../../../../metamodel/models';
@@ -14,7 +12,7 @@ describe('[Instance][Search][Component][Criteria][SearchType] CheckboxComponent'
     @Component({
         selector: `app-host`,
         template: `
-            <app-checkbox 
+            <app-checkbox
                     [id]="id"
                     [label]="label"
                     [options]="options"
@@ -41,7 +39,6 @@ describe('[Instance][Search][Component][Criteria][SearchType] CheckboxComponent'
                 TestHostComponent
             ],
             imports: [
-                // NgSelectModule,
                 FormsModule,
                 ReactiveFormsModule
             ]
@@ -56,18 +53,18 @@ describe('[Instance][Search][Component][Criteria][SearchType] CheckboxComponent'
         expect(testedComponent).toBeTruthy();
     });
 
-    it.only('should execute ngOnInit lifecycle', () => {
-        testedComponent.options = [
-            { label: 'One', value: 'one', display: 1 },
-            { label: 'Two', value: 'two', display: 2 },
-            { label: 'Three', value: 'three', display: 3 }
-        ];
-        testedComponent.ngOnInit();
-        console.log(testedComponent.options.length);
-        const formArray = testedComponent.form.controls.checkboxes as FormArray;
-        // console.log(formArray.controls[0]);
-        expect(testedComponent).toBeTruthy();
-    });
+    // it('should execute ngOnInit lifecycle', () => {
+    //     testedComponent.options = [
+    //         { label: 'One', value: 'one', display: 1 },
+    //         { label: 'Two', value: 'two', display: 2 },
+    //         { label: 'Three', value: 'three', display: 3 }
+    //     ];
+    //     testedComponent.ngOnInit();
+    //     console.log(testedComponent.options.length);
+    //     const formArray = testedComponent.form.controls.checkboxes as FormArray;
+    //     // console.log(formArray.controls[0]);
+    //     expect(testedComponent).toBeTruthy();
+    // });
 
     // it('should call ngOnChanges and apply changes', () => {
     //     const spy = jest.spyOn(testedComponent, 'ngOnChanges');
-- 
GitLab