summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts23
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.spec.ts19
2 files changed, 31 insertions, 11 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts
index eeb76e26..f491f372 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.component.spec.ts
@@ -3,11 +3,11 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormFieldsComponent } from './form-fields.component';
describe('FormFieldsComponent', () => {
- let component: FormFieldsComponent;
+ let component: FormFieldsComponent;
let fixture: ComponentFixture<FormFieldsComponent>;
-
+
beforeEach(async(() => {
- TestBed.configureTestingModule({
+ TestBed.configureTestingModule({
declarations: [ FormFieldsComponent ]
})
.compileComponents();
@@ -25,26 +25,26 @@ describe('FormFieldsComponent', () => {
it('should test ngOnInit function', () => {
component.ngOnInit();
- })
+ });
it('should test isLast functions', () =>{
component.formFieldsListObj = [1,2,3,4,5];
let test: Boolean = component.isLast(3);
expect(test).toEqual(false);
- })
+ });
it('should test isFirst function', () => {
let test: Boolean = component.isFirst(0);
expect(test).toEqual(true);
- })
+ });
it('should test ngDoCheck', () => {
component.sqlAsDefaultValue = true;
component.ngDoCheck();
expect(component.showDefaultSQLOption).toEqual(true);
- })
-
- it('should test close function', () => {
+ });
+
+ it('should test close function', () => {
component.close();
expect(component.closable).toEqual(false);
});
@@ -55,11 +55,12 @@ describe('FormFieldsComponent', () => {
});
it('should test openDialog method', () => {
- expect(component.openDialog()).toHaveBeenCalled;
+ expect(component.openDialog).toHaveBeenCalled();
});
it('should test openSnackBar method', () => {
- expect(component.openSnackBar("Just", "for testing")).toHaveBeenCalled;
+ component.openSnackBar("Just", "for testing");
+ expect(component.openSnackBar).toHaveBeenCalled();
})
});
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.spec.ts
index f1d53d9e..8e77e7b6 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/run/run-report/run-report.component.spec.ts
@@ -31,4 +31,23 @@ describe('RunReportFinalTableComponent', () => {
it('should compile', () => {
expect(component).toBeTruthy();
});
+
+ it('should test ngOnInit method ', () => {
+ component.ngOnInit();
+ expect(component.initialProcesses()).toHaveBeenCalled();
+ });
+
+ it('should test initialProcess method', () => {
+ component.DashboardReportObj.length = 1;
+ component.initialProcesses();
+ expect(component.options.scrollSpeed).toEqual(20);
+ });
+
+ it('should test showError method', () => {
+ component.showError("abc");
+ expect(component.error).toEqual(true);
+ expect(component.showSpinner).toEqual(false);
+ })
+
+
});