Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
// import { ServiceLinesComponent } from './service-lines.component';
// import { EwvViewerService } from '../../ewv-viewer/ewv-viewer.service';
// import { BehaviorSubject } from 'rxjs/BehaviorSubject';
// import { ServiceLinesService } from './service-lines.service';
// describe('ServiceLinesComponent', () => {
// let component: ServiceLinesComponent;
// let ewvViewerService: EwvViewerService;
// let serviceLinesService: ServiceLinesService;
// beforeEach(() => {
// ewvViewerService = new EwvViewerService(null, null);
// serviceLinesService = new ServiceLinesService();
// component = new ServiceLinesComponent(ewvViewerService, serviceLinesService);
// jasmine.clock().install();
// });
// afterEach(function() {
// jasmine.clock().uninstall();
// });
// it('should be created', () => {
// expect(component).toBeTruthy(); // Expects component to be created
// });
// it('test ngOnInit method', () => {
// component.data = {};
// ewvViewerService.isSplitView = new BehaviorSubject<boolean>(false);
// expect(component.isSplitView).toEqual(undefined);
// const differencesReturn = [
// 'DATA_0', 'DATA_1', 'DATA_2', 'DATA_3', 'DATA_4'
// ];
// serviceLinesService.differences = new BehaviorSubject(differencesReturn);
// spyOn(component, 'highlight');
// component.ngOnInit();
// expect(component.isSplitView).toEqual(false);
// expect(component.highlight).toHaveBeenCalled();
// expect(component.foundDifferences).toEqual('DATA_0');
// expect(component.billingMiscDiffs).toEqual('DATA_1');
// });
// it('test ngAfterViewInit method', () => {
// spyOn(component, 'populateData');
// spyOn(serviceLinesService, 'getInstance');
// component.ngAfterViewInit();
// jasmine.clock().tick(1);
// expect(component.populateData).toHaveBeenCalled();
// expect(serviceLinesService.getInstance).toHaveBeenCalled();
// expect(serviceLinesService.getInstance).toHaveBeenCalledWith(component);
// });
// it('test populateData method', () => {
// component.data = { };
// component.isSplitView = false;
// spyOn(component, 'compare');
// component.populateData();
// expect(component.compare).not.toHaveBeenCalled();
// });
// it('test ngOnChanges method', () => {
// spyOn(component, 'populateData');
// expect(component.data).toEqual(undefined);
// let changes;
// changes = {
// data: {
// currentValue: null
// }
// };
// component.ngOnChanges(changes);
// expect(component.data).toEqual(null);
// expect(component.populateData).not.toHaveBeenCalled();
// });
// it('test ngOnDestroy method', () => {
// spyOn(component.collapseStateSubscription, 'unsubscribe');
// spyOn(component.isSplitSubscription, 'unsubscribe');
// component.ngOnDestroy();
// expect(component.collapseStateSubscription.unsubscribe).toHaveBeenCalled();
// expect(component.isSplitSubscription.unsubscribe).toHaveBeenCalled();
// });
// it('test regx method', () => {
// const result = component.regx('$22.23');
// expect(result).toEqual('$22.23');
// });
// it('test getDisplayInfoForListOfDrugLines method', () => {
// const inputArray = [
// {},
// {
// drugRx: 'DRUG_RX_1',
// drugRxNdcCode: 'DRUG_RX_ND_CODE_1',
// drugRxQuantityPlusType: 'DRUG_RX_QUANTITY_1 DRUG_RX_TYPE_1',
// drugRxCharge: '',
// drugRxQuantity: 'DRUG_RX_QUANTITY_1',
// drugRxType: 'DRUG_RX_TYPE_1',
// drugCategory_5010: 'DRUG_CATEGORY_1'
// }
// ];
// const result = component.getDisplayInfoForListOfDrugLines(inputArray);
// expect(result).not.toEqual(null);
// expect(result).toBeDefined();
// expect(result.length).toEqual(inputArray.length);
// expect(result[0]['drugRx']).toEqual('DRUG RX:');
// expect(result[0]['drugRxNdcCode']).toEqual('');
// expect(result[0]['drugRxQuantity']).toEqual('');
// expect(result[0]['drugRxType']).toEqual('');
// expect(result[0]['drugRxQuantityPlusType']).toEqual('');
// expect(result[0]['amount']).toEqual('');
// expect(result[1]['drugRx']).toEqual('DRUG RX (DRUG_CATEGORY_1): DRUG_RX_1');
// expect(result[1]['drugRxNdcCode']).toEqual('DRUG_RX_ND_CODE_1');
// expect(result[1]['drugRxQuantity']).toEqual('DRUG_RX_QUANTITY_1');
// expect(result[1]['drugRxType']).toEqual('DRUG_RX_TYPE_1');
// expect(result[1]['drugRxQuantityPlusType']).toEqual(
// 'DRUG_RX_QUANTITY_1 DRUG_RX_TYPE_1'
// );
// });
// it('test isDifferentColumn method', () => {
// const claimData = {
// serviceLinesInfo: [
// { lineNumber: '1' },
// { lineNumber: '2' },
// {
// lineNumber: '3',
// firstProperty: 'FIRST_PROPERTY_DATA',
// secondProperty: 'SECOND_PROPERTY_DATA'
// }
// ]
// };
// spyOn(ewvViewerService, 'getClaimData').and.returnValue(claimData);
// const row = { lineNumber: '3', firstProperty: 'FIRST_PROPERTY_DATA' };
// const column = { property: 'thirdProperty' };
// const returnValue = component.isDifferentColumn(row, column);
// expect(returnValue).toEqual(false);
// expect(ewvViewerService.getClaimData).toHaveBeenCalled();
// });
// it('test isDifferentRow method', () => {
// component.differentLineNumberArray = [
// { lineNumber: '1' },
// { lineNumber: '2' },
// { lineNumber: '3' },
// { lineNumber: '4' }
// ];
// const row = { lineNumber: '3' };
// const returnValue = component.isDifferentRow(row);
// expect(returnValue).toEqual(true);
// });
// it('test displayOperatorPhysicianNameAndNpiInformation method', () => {
// const row = { operatorPhysicianNpi: 'PHYSICIAN_NPI', operatorPhysicianName: 'PHYSICIAN_NAME' };
// const returnValue = component.displayOperatorPhysicianNameAndNpiInformation(row);
// expect(returnValue).toEqual(true);
// });
// it('test compare method', () => {
// const getClaimDataReturn = {
// serviceLinesInfo: [
// { lineNumber: 1 }, { lineNumber: 2 }, { lineNumber: 3 }, { lineNumber: 4 }
// ]
// };
// spyOn(ewvViewerService, 'getClaimData').and.returnValue(getClaimDataReturn);
// component.data = {
// serviceLinesInfo: [
// { lineNumber: 1 }, { lineNumber: 2 }, { lineNumber: 3 }, { lineNumber: 4 }
// ]
// };
// expect(component.sameLineNumberArray).toEqual([ ]);
// expect(component.differentLineNumberArray).toEqual([ ]);
// component.compare();
// expect(ewvViewerService.getClaimData).toHaveBeenCalled();
// expect(component.sameLineNumberArray).toEqual([
// { lineNumber: 1 }, { lineNumber: 2 }, { lineNumber: 3 }, { lineNumber: 4 } ]);
// expect(component.differentLineNumberArray).toEqual([
// { lineNumber: 2 }, { lineNumber: 3 }, { lineNumber: 4 }, { lineNumber: 1 }, { lineNumber: 3 },
// { lineNumber: 4 }, { lineNumber: 1 }, { lineNumber: 2 }, { lineNumber: 4 }, { lineNumber: 1 },
// { lineNumber: 2 }, { lineNumber: 3 }
// ]);
// });
// it('test highlight method', () => {
// component.tableInfoRows = [
// { lineNumber: 1 }, { lineNumber: 2 }, { lineNumber: 3 }, { lineNumber: 4 }, { lineNumber: 5 }, { lineNumber: 6 }
// ];
// component.foundDifferences = [
// { lineNumber: 3 }, { lineNumber: 5}, { lineNumber: 10 }, { lineNumber: 12 }
// ];
// expect(component.finalDiffsObj).toEqual({});
// spyOn(component, 'getExtraRowsToHighlight');
// component.highlight();
// expect(component.tableInfoRows).toEqual( [
// { lineNumber: 1 }, { lineNumber: 2 }, { lineNumber: 3 }, { lineNumber: 4 }, { lineNumber: 5 }, { lineNumber: 6 }
// ]);
// expect(component.foundDifferences).toEqual([
// { lineNumber: 3 }, { lineNumber: 5 }, { lineNumber: 10 }, { lineNumber: 12 }
// ]);
// expect(component.finalDiffsObj).toEqual({ });
// expect(component.getExtraRowsToHighlight).toHaveBeenCalled();
// });
// it('test getExtraRowsToHighlight method', () => {
// serviceLinesService.firstClaimObject = { tableInfoRows: [ 'FIRST_CLAIM_1', 'FIRST_CLAIM_2', 'FIRST_CLAIM_3', 'FIRST_CLAIM_4', 'FIRST_CLAIM_5' ] };
// serviceLinesService.secondClaimObject = { tableInfoRows: [ 'SECOND_CLAIM_1', 'SECOND_CLAIM_2', 'SECOND_CLAIM_3' ] };
// expect(component.extraHighlightRows).toEqual([]);
// component.getExtraRowsToHighlight();
// expect(component.extraHighlightRows).toEqual([1, 1]);
// });
// });