Produced by Araxis Merge on 10/4/2017 8:04:36 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | rdk.zip\rdk\product\production\rdk\src\write\orders\common | orders-common-discontinue-vista-writer-itest-spec.js | Mon Aug 21 12:51:00 2017 UTC |
| 2 | rdk.zip\rdk\product\production\rdk\src\write\orders\common | orders-common-discontinue-vista-writer-itest-spec.js | Tue Oct 3 18:59:56 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 5 | 298 |
| Changed | 4 | 24 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | 'use stric t'; | |
| 2 | ||
| 3 | var saveVi staWriter = require( '../lab/or ders-lab-v ista-write r'); | |
| 4 | var discon tinueVista Writer = r equire('./ orders-com mon-discon tinue-vist a-writer') ; | |
| 5 | var discon tinueDetai lsVistaWri ter = requ ire('./ord ers-common -discontin ue-details -vista-wri ter'); | |
| 6 | var rpcCli entFactory = require ('./../../ core/rpc-c lient-fact ory'); | |
| 7 | var async = require( 'async'); | |
| 8 | ||
| 9 | var discon tinueWrite backContex t = { | |
| 10 | pid: ' R E D A CTED ;100615', | |
| 11 | vistaC onfig: { | |
| 12 | host: ' IP ', | |
| 13 | port: PORT , | |
| 14 | accessCode : ' PL ', | |
| 15 | verifyCode : ' PL !!', | |
| 16 | localIP: ' IP ', | |
| 17 | lo calAddress : 'localho st', | |
| 18 | no Reconnect: true | |
| 19 | }, | |
| 20 | model: { | |
| 21 | 'p rovider': '100000002 38', | |
| 22 | 'l ocation': '285', | |
| 23 | 'k ind': 'Lab oratory', | |
| 24 | 'o rderList': [ | |
| 25 | {'orderI d': '0', ' hash': 'fo obar'} | |
| 26 | ] | |
| 27 | }, | |
| 28 | interc eptorResul ts: { | |
| 29 | pa tientIdent ifiers: { | |
| 30 | 'dfn': ' 3', | |
| 31 | } | |
| 32 | }, | |
| 33 | logger : sinon.st ub(require ('bunyan') .createLog ger({name: 'disconti nue-vista- writer'})) | |
| 34 | }; | |
| 35 | ||
| 36 | var saveWr itebackCon text = { | |
| 37 | pid: ' R E D A CTED ;100615', | |
| 38 | vistaC onfig: { | |
| 39 | host: ' IP ', | |
| 40 | port: PORT , | |
| 41 | accessCode : ' PL ', | |
| 42 | verifyCode : ' PL !!', | |
| 43 | localIP: ' IP ', | |
| 44 | lo calAddress : 'localho st', | |
| 45 | no Reconnect: true | |
| 46 | }, | |
| 47 | model: { | |
| 48 | 'p rovider': '100000002 71', | |
| 49 | 'l ocation': '285', | |
| 50 | 'o rderDialog ': 'LR OTH ER LAB TES TS', | |
| 51 | 'd isplayGrou p': '5', | |
| 52 | 'q uickOrderD ialog': '2 ', | |
| 53 | 'i nputList': [{ | |
| 54 | 'inputKe y': '4', | |
| 55 | 'inputVa lue': '299 ' | |
| 56 | }, { | |
| 57 | 'inputKe y': '126', | |
| 58 | 'inputVa lue': '1' | |
| 59 | }, { | |
| 60 | 'inputKe y': '127', | |
| 61 | 'inputVa lue': '72' | |
| 62 | }, { | |
| 63 | 'inputKe y': '180', | |
| 64 | 'inputVa lue': '9' | |
| 65 | }, { | |
| 66 | 'inputKe y': '28', | |
| 67 | 'inputVa lue': 'WC' | |
| 68 | }, { | |
| 69 | 'inputKe y': '6', | |
| 70 | 'inputVa lue': 'NOW ' | |
| 71 | }, { | |
| 72 | 'inputKe y': '29', | |
| 73 | 'inputVa lue': '28' | |
| 74 | }] , | |
| 75 | 'k ind': 'Lab oratory' | |
| 76 | }, | |
| 77 | interc eptorResul ts: { | |
| 78 | pa tientIdent ifiers: { | |
| 79 | 'dfn': ' 100716', | |
| 80 | } | |
| 81 | }, | |
| 82 | logger : sinon.st ub(require ('bunyan') .createLog ger({ | |
| 83 | na me: 'check -vista-wri ter' | |
| 84 | })) | |
| 85 | }; | |
| 86 | ||
| 87 | describe(' write-back orders co mmon disco ntinue vis ta writer integratio n tests', function() { | |
| 88 | afterE ach(functi on() { | |
| 89 | rp cClientFac tory.close RpcClient( discontinu eWriteback Context); | |
| 90 | }); | |
| 91 | ||
| 92 | //Test w/o requi red orderI d | |
| 93 | it('te sts that d iscontinue order ret urns error with no v prResponse & no vprM odel', fun ction(done ) { | |
| 94 | th is.timeout (5000); | |
| 95 | di scontinueV istaWriter (discontin ueWritebac kContext, function(e rr, result ) { | |
| 96 | expect(e rr).to.be. truthy(); | |
| 97 | expect(d iscontinue WritebackC ontext.vpr Response). to.be.unde fined(); | |
| 98 | done(); | |
| 99 | }) ; | |
| 100 | }); | |
| 101 | ||
| 102 | ||
| 103 | //This test will create ne w lab orde rs in Vist a. Uncomm ent to tes t locally | |
| 104 | it.ski p('tests t hat discon tinue orde r returns successful vprRespon se', funct ion(done) { | |
| 105 | th is.timeout (20000); | |
| 106 | as ync.waterf all([ | |
| 107 | function (callback) { | |
| 108 | save VistaWrite r.create(s aveWriteba ckContext, function( err, resul t) { | |
| 109 | expect(err ).to.be.fa lsy(); | |
| 110 | expect(sav eWriteback Context.vp rResponse) .to.be.tru thy(); | |
| 111 | var result Json = JSO N.parse(sa veWritebac kContext.v prResponse ); | |
| 112 | callback(n ull, resul tJson.orde rCheckList ); | |
| 113 | }); | |
| 114 | }, | |
| 115 | function (orderChec kList, cal lback) { | |
| 116 | if ( !orderChec kList) { | |
| 117 | saveVistaW riter.crea te(saveWri tebackCont ext, funct ion(err, r esult) { | |
| 118 | expect (err).to.b e.falsy(); | |
| 119 | expect (saveWrite backContex t.vprRespo nse).to.be .truthy(); | |
| 120 | var re sultJson = JSON.pars e(saveWrit ebackConte xt.vprResp onse); | |
| 121 | callba ck(null, r esultJson. orderCheck List); | |
| 122 | }); | |
| 123 | } el se { | |
| 124 | callback(n ull, order CheckList) ; | |
| 125 | } | |
| 126 | }, | |
| 127 | function (orderChec kList, cal lback) { | |
| 128 | save WritebackC ontext.mod el.orderCh eckList = orderCheck List; | |
| 129 | save VistaWrite r.create(s aveWriteba ckContext, function( err, resul t) { | |
| 130 | expect(err ).to.be.fa lsy(); | |
| 131 | expect(sav eWriteback Context.vp rResponse) .to.be.tru thy(); | |
| 132 | var result Json = JSO N.parse(sa veWritebac kContext.v prResponse ); | |
| 133 | callback(n ull, resul tJson.loca lId + ';1' ); | |
| 134 | }); | |
| 135 | }, | |
| 136 | function (orderId, callback) { | |
| 137 | cons ole.log('= ==== order ID: ' + o rderId); | |
| 138 | save WritebackC ontext.mod el.orderId s = [order Id]; | |
| 139 | disc ontinueDet ailsVistaW riter(save WritebackC ontext, fu nction(err , result) { | |
| 140 | expect(err ).not.to.b e.truthy() ; | |
| 141 | expect(sav eWriteback Context.vp rResponse) .not.to.be .empty(); | |
| 142 | expect(sav eWriteback Context.vp rResponse[ 0].orderId ).to.equal (orderId); | |
| 143 | console.lo g('detail: ' + saveW ritebackCo ntext.vprR esponse[0] .detail); | |
| 144 | expect(sav eWriteback Context.vp rResponse[ 0].detail) .not.to.be .null(); | |
| 145 | console.lo g('hash: ' + saveWri tebackCont ext.vprRes ponse[0].h ash); | |
| 146 | expect(sav eWriteback Context.vp rResponse[ 0].hash).n ot.to.be.n ull(); | |
| 147 | discontinu eWriteback Context.mo del.orderL ist[0].ord erId = ord erId; | |
| 148 | discontinu eWriteback Context.mo del.orderL ist[0].has h = saveWr itebackCon text.vprRe sponse[0]. hash; | |
| 149 | discontinu eVistaWrit er(discont inueWriteb ackContext , function (err, resu lt) { | |
| 150 | expect (err).to.b e.falsy(); | |
| 151 | expect (discontin ueWritebac kContext.v prResponse ).to.be.tr uthy(); | |
| 152 | callba ck('pau'); | |
| 153 | }); | |
| 154 | }); | |
| 155 | } | |
| 156 | ], function( err, resul ts) { | |
| 157 | done(); | |
| 158 | }) ; | |
| 159 | }); | |
| 160 | ||
| 161 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.