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-check-session-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-check-session-vista-writer-itest-spec.js | Tue Oct 3 18:57:17 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 222 |
| Changed | 1 | 10 |
| 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 checkS essionVist aWriter = require('. /orders-co mmon-check -session-v ista-write r'); | |
| 5 | var rpcCli entFactory = require ('./../../ core/rpc-c lient-fact ory'); | |
| 6 | var async = require( 'async'); | |
| 7 | ||
| 8 | var saveWr itebackCon text = { | |
| 9 | pid: ' 9E7A;10061 5', | |
| 10 | vistaC onfig: { | |
| 11 | host: ' IP ', | |
| 12 | port: PORT , | |
| 13 | accessCode : ' PL ', | |
| 14 | verifyCode : ' PL !!', | |
| 15 | localIP: ' IP ', | |
| 16 | lo calAddress : 'localho st', | |
| 17 | no Reconnect: true | |
| 18 | }, | |
| 19 | model: { | |
| 20 | 'd fn': '1007 16', | |
| 21 | 'p rovider': '100000002 71', | |
| 22 | 'l ocation': '129', | |
| 23 | 'o rderDialog ': 'LR OTH ER LAB TES TS', | |
| 24 | 'd isplayGrou p': '5', | |
| 25 | 'q uickOrderD ialog': '2 ', | |
| 26 | 'i nputList': [{ | |
| 27 | 'inputKe y': '4', | |
| 28 | 'inputVa lue': '299 ' | |
| 29 | }, { | |
| 30 | 'inputKe y': '126', | |
| 31 | 'inputVa lue': '1' | |
| 32 | }, { | |
| 33 | 'inputKe y': '127', | |
| 34 | 'inputVa lue': '72' | |
| 35 | }, { | |
| 36 | 'inputKe y': '180', | |
| 37 | 'inputVa lue': '9' | |
| 38 | }, { | |
| 39 | 'inputKe y': '28', | |
| 40 | 'inputVa lue': 'WC' | |
| 41 | }, { | |
| 42 | 'inputKe y': '6', | |
| 43 | 'inputVa lue': 'NOW ' | |
| 44 | }, { | |
| 45 | 'inputKe y': '29', | |
| 46 | 'inputVa lue': '28' | |
| 47 | }] , | |
| 48 | 'k ind': 'Lab oratory' | |
| 49 | }, | |
| 50 | logger : sinon.st ub(require ('bunyan') .createLog ger({ | |
| 51 | na me: 'check -vista-wri ter' | |
| 52 | })) | |
| 53 | }; | |
| 54 | ||
| 55 | describe(' write-back orders co mmon check session v ista write r integrat ion tests' , function () { | |
| 56 | ||
| 57 | afterE ach(functi on() { | |
| 58 | rp cClientFac tory.close RpcClient( saveWriteb ackContext ); | |
| 59 | }); | |
| 60 | ||
| 61 | //Test w/o requi red order ID | |
| 62 | it('te sts that c heck sessi on returns error', f unction(do ne) { | |
| 63 | th is.timeout (50000); | |
| 64 | ch eckSession VistaWrite r.check(nu ll, saveWr itebackCon text, func tion(err, result) { | |
| 65 | expect(e rr).to.be. truthy(); | |
| 66 | done(); | |
| 67 | }) ; | |
| 68 | }); | |
| 69 | ||
| 70 | //This test will create ne w lab orde rs in Vist a. Uncomm ent to tes t locally | |
| 71 | it.ski p('tests t hat action valid ret urns no er ror', func tion(done) { | |
| 72 | th is.timeout (15000); | |
| 73 | as ync.waterf all([ | |
| 74 | function (callback) { | |
| 75 | save VistaWrite r.create(s aveWriteba ckContext, function( err, resul t) { | |
| 76 | expect(err ).to.be.fa lsy(); | |
| 77 | expect(sav eWriteback Context.vp rResponse) .to.be.tru thy(); | |
| 78 | var result Json = JSO N.parse(sa veWritebac kContext.v prResponse ); | |
| 79 | callback(n ull, resul tJson.orde rCheckList ); | |
| 80 | }); | |
| 81 | }, | |
| 82 | function (orderChec kList, cal lback) { | |
| 83 | if ( !orderChec kList) { | |
| 84 | saveVistaW riter.crea te(saveWri tebackCont ext, funct ion(err, r esult) { | |
| 85 | expect (err).to.b e.falsy(); | |
| 86 | expect (saveWrite backContex t.vprRespo nse).to.be .truthy(); | |
| 87 | var re sultJson = JSON.pars e(saveWrit ebackConte xt.vprResp onse); | |
| 88 | callba ck(null, r esultJson. orderCheck List); | |
| 89 | }); | |
| 90 | } el se { | |
| 91 | callback(n ull, order CheckList) ; | |
| 92 | } | |
| 93 | }, | |
| 94 | function (orderChec kList, cal lback) { | |
| 95 | save WritebackC ontext.mod el.orderCh eckList = orderCheck List; | |
| 96 | save VistaWrite r.create(s aveWriteba ckContext, function( err, resul t) { | |
| 97 | expect(err ).to.be.fa lsy(); | |
| 98 | expect(sav eWriteback Context.vp rResponse) .to.be.tru thy(); | |
| 99 | var result Json = JSO N.parse(sa veWritebac kContext.v prResponse ); | |
| 100 | callback(n ull, resul tJson.loca lId + ';1' ); | |
| 101 | }); | |
| 102 | }, | |
| 103 | function (orderId, callback) { | |
| 104 | cons ole.log('= ==== order ID: ' + o rderId); | |
| 105 | chec kSessionVi staWriter. check(orde rId, saveW ritebackCo ntext, fun ction(err, result) { | |
| 106 | expect(err ).not.to.b e.truthy() ; | |
| 107 | callback(' pau'); | |
| 108 | }); | |
| 109 | } | |
| 110 | ], function( err, resul ts) { | |
| 111 | done(); | |
| 112 | }) ; | |
| 113 | }); | |
| 114 | ||
| 115 | ||
| 116 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.