Produced by Araxis Merge on 10/3/2017 11:16:01 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 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\handlers\osync\patientlist | patientlist-itest-spec.js | Mon Aug 28 20:41:42 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\handlers\osync\patientlist | patientlist-itest-spec.js | Tue Oct 3 12:51:51 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 5 | 224 |
| Changed | 4 | 22 |
| 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 | require('. ./../../.. /../env-se tup'); | |
| 4 | var _ = re quire('und erscore'); | |
| 5 | var log = require(gl obal.VX_DU MMIES + 'd ummy-logge r'); | |
| 6 | // NOTE: b e sure nex t lines ar e commente d out befo re pushing | |
| 7 | // var log Util = req uire(globa l.VX_UTILS + 'log'); | |
| 8 | // log = l ogUtil._cr eateLogger ({ | |
| 9 | // nam e: 'patien tlist-ites t-spec', | |
| 10 | // lev el: 'debug ', | |
| 11 | // chi ld: logUti l._createL ogger | |
| 12 | // }); | |
| 13 | ||
| 14 | var handle r = requir e(global.V X_HANDLERS + 'osync/ patientlis t/patientl ist'); | |
| 15 | ||
| 16 | var testHa ndler = re quire(glob al.VX_INTT ESTS + 'fr amework/ha ndler-test -framework ').testHan dler; | |
| 17 | var moment = require ('moment') ; | |
| 18 | var PjdsCl ient = req uire(globa l.VX_SUBSY STEMS + 'j ds/pjds-cl ient'); | |
| 19 | var val = require(gl obal.VX_UT ILS + 'obj ect-utils' ).getPrope rty; | |
| 20 | ||
| 21 | var config = require (global.VX _ROOT + 'w orker-conf ig'); | |
| 22 | ||
| 23 | ||
| 24 | var testCo nfig = req uire(globa l.VX_INTTE STS + 'tes t-config') ; | |
| 25 | var host = testConfi g.vxsyncIP ; | |
| 26 | var port = PORT ; | |
| 27 | var tubena me = 'sync '; | |
| 28 | ||
| 29 | var osyncJ obUtils = require(gl obal.OSYNC _UTILS + ' osync-job- utils'); | |
| 30 | ||
| 31 | var config = require (global.VX _ROOT + 'w orker-conf ig'); | |
| 32 | ||
| 33 | var mockCo nfig = { | |
| 34 | pjds: _.defaults (config.pj ds, { | |
| 35 | pr otocol: 'h ttp', | |
| 36 | host: ' IP ', | |
| 37 | port: PORT | |
| 38 | }), | |
| 39 | delay: 5, | |
| 40 | rpcCon text: 'HMP SYNCHRONI ZATION CON TEXT', | |
| 41 | vistaS ites: _.de faults(con fig.vistaS ites, { | |
| 42 | '9 E7A': { | |
| 43 | 'name': 'panorama' , | |
| 44 | 'host': ' IP ', | |
| 45 | 'port': PORT , | |
| 46 | 'accessCod e': ' REDACTED ', | |
| 47 | 'verifyCod e': ' REDACTED ', | |
| 48 | 'localIP ': '127.0. 0.1', | |
| 49 | 'station Number': 5 00, | |
| 50 | 'localAd dress': 'l ocalhost', | |
| 51 | 'connect Timeout': 3000, | |
| 52 | 'sendTim eout': 200 00 | |
| 53 | }, | |
| 54 | 'C 877': { | |
| 55 | 'name': 'kodak', | |
| 56 | 'host': ' IP ', | |
| 57 | 'port': PORT , | |
| 58 | 'accessCod e': ' REDACTED ', | |
| 59 | 'verifyCod e': ' REDACTED ', | |
| 60 | 'localIP ': '127.0. 0.1', | |
| 61 | 'station Number': 5 00, | |
| 62 | 'localAd dress': 'l ocalhost', | |
| 63 | 'connect Timeout': 3000, | |
| 64 | 'sendTim eout': 200 00 | |
| 65 | } | |
| 66 | }) | |
| 67 | }; | |
| 68 | ||
| 69 | var user = { | |
| 70 | uid: ' urn:va:use r:9E7A:100 00000002', | |
| 71 | site: '9E7A', | |
| 72 | id: '1 0000000002 ', | |
| 73 | lastSu ccessfulLo gin: momen t().format ('YYYYMMDD HHmmss') | |
| 74 | }; | |
| 75 | ||
| 76 | describe(' patientlis t.handle', function( ) { | |
| 77 | before Each(funct ion(done) { | |
| 78 | va r pjds = n ew PjdsCli ent(log, l og, mockCo nfig); | |
| 79 | pj ds.addActi veUser(use r, functio n(error, r esponse) { | |
| 80 | log.debu g('patient list-itest -spec.hand le: Respon se from ca ll to pjds .addActive User. err or: %s, re sponse: %j ', error, response); | |
| 81 | expect(e rror).toBe Falsy(); | |
| 82 | expect(v al(respons e, 'status Code')).to Be(201); | |
| 83 | done(); | |
| 84 | }) ; | |
| 85 | }); | |
| 86 | ||
| 87 | it('sh ould gener ate sync j obs', func tion() { | |
| 88 | va r environm ent = { | |
| 89 | pjds: ne w PjdsClie nt(log, lo g, mockCon fig), | |
| 90 | jobStatu sUpdater: { | |
| 91 | crea teJobStatu s: functio n(job, cal lback) { | |
| 92 | callback() ; | |
| 93 | }, | |
| 94 | erro rJobStatus : function (job, erro r, callbac k) { | |
| 95 | callback() ; | |
| 96 | } | |
| 97 | }, | |
| 98 | metrics: log | |
| 99 | }; | |
| 100 | ||
| 101 | va r job = os yncJobUtil s.createPa tientListJ ob(log, { | |
| 102 | type: 'p atientlist ', | |
| 103 | user: us er | |
| 104 | }) ; | |
| 105 | ||
| 106 | va r matchJob Types = {j obTypes: [ 'sync'], i gnoreTotal Jobs: true }; | |
| 107 | ||
| 108 | ru ns(functio n() { | |
| 109 | testHand ler(handle r, log, mo ckConfig, environmen t, host, p ort, tuben ame, job, matchJobTy pes, 10000 , function (result) { | |
| 110 | expe ct(result) .toBeTruth y(); | |
| 111 | }); | |
| 112 | }) ; | |
| 113 | }); | |
| 114 | ||
| 115 | afterE ach(functi on(done) { | |
| 116 | va r pjds = n ew PjdsCli ent(log, l og, mockCo nfig); | |
| 117 | pj ds.removeA ctiveUser( user.uid, function(e rror, resp onse) { | |
| 118 | expect(e rror).toBe Falsy(); | |
| 119 | expect(r esponse.st atusCode). toBe(200); | |
| 120 | done(); | |
| 121 | }) ; | |
| 122 | }); | |
| 123 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.