Produced by Araxis Merge on 10/3/2017 11:16:02 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\utils\osync | active-user-userscreen-retriever-itest-spec.js | Mon Aug 28 20:41:42 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\utils\osync | active-user-userscreen-retriever-itest-spec.js | Tue Oct 3 13:09:12 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 312 |
| Changed | 2 | 8 |
| 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-setup '); | |
| 4 | ||
| 5 | var _ = re quire('und erscore'); | |
| 6 | var moment = require ('moment') ; | |
| 7 | ||
| 8 | var logger = require (global.VX _DUMMIES + 'dummy-lo gger'); | |
| 9 | var wConfi g = requir e(global.V X_ROOT + ' worker-con fig'); | |
| 10 | var PjdsCl ient = req uire(globa l.VX_SUBSY STEMS + 'j ds/pjds-cl ient'); | |
| 11 | var JdsCli ent = requ ire(global .VX_SUBSYS TEMS + 'jd s/jds-clie nt'); | |
| 12 | ||
| 13 | var retrie ver = requ ire(global .OSYNC_UTI LS + 'acti ve-user-us erscreen-r etriever') ; | |
| 14 | ||
| 15 | var user1 = { | |
| 16 | 'duz': { | |
| 17 | '9 E7A': 'use r1' | |
| 18 | }, | |
| 19 | 'lastl ogin': mom ent().form at(), | |
| 20 | 'patie ntList': [ { | |
| 21 | 'p id': 'pati ent1', | |
| 22 | 'd ata': 'som e data', | |
| 23 | 'i nformation ': 'some m ore data' | |
| 24 | }, { | |
| 25 | 'p id': 'pati ent2', | |
| 26 | 'd ata': 'som e differen t data', | |
| 27 | 'i nformation ': 'some m ore differ ent data' | |
| 28 | }] | |
| 29 | }; | |
| 30 | var user2 = { | |
| 31 | 'duz': { | |
| 32 | 'C 877': 'use r2' | |
| 33 | }, | |
| 34 | 'lastl ogin': '20 14-01-11', | |
| 35 | 'patie ntList': [ { | |
| 36 | 'p id': 'pati ent2', | |
| 37 | 'd ata': 'som e differen t data', | |
| 38 | 'i nformation ': 'some m ore differ ent data' | |
| 39 | }, { | |
| 40 | 'p id': 'pati ent3', | |
| 41 | 'd ata': 'som e informat ion', | |
| 42 | 'i nformation ': 'some m ore inform ation' | |
| 43 | }] | |
| 44 | }; | |
| 45 | var usersL ist = [use r1, user2] ; | |
| 46 | ||
| 47 | describe(' active-use r-userscre en-retriev er.js', fu nction() { | |
| 48 | var co nfig = {jd s: _.defau lts(wConfi g.jds, { | |
| 49 | pr otocol: 'h ttp', | |
| 50 | host: ' IP ', | |
| 51 | port: PORT | |
| 52 | }), | |
| 53 | pj ds: _.defa ults(wConf ig.pjds, { | |
| 54 | protocol : 'http', | |
| 55 | host: ' IP ', | |
| 56 | port: PORT | |
| 57 | }) | |
| 58 | }; | |
| 59 | ||
| 60 | var pj ds = new P jdsClient( logger, lo gger, conf ig); | |
| 61 | var jd s = new Jd sClient(lo gger, logg er, config ); | |
| 62 | ||
| 63 | var en vironment = { | |
| 64 | jd s: jds, | |
| 65 | pj ds: pjds | |
| 66 | }; | |
| 67 | ||
| 68 | var te stDone; | |
| 69 | ||
| 70 | before Each(funct ion() { | |
| 71 | te stDone = f alse; | |
| 72 | va r setUpDon e = false; | |
| 73 | ||
| 74 | ru ns(functio n () { | |
| 75 | jds.save ActiveUser s(usersLis t, functio n(err) { | |
| 76 | expe ct(err).to BeFalsy(); | |
| 77 | setU pDone = tr ue; | |
| 78 | }); | |
| 79 | }) ; | |
| 80 | ||
| 81 | wa itsFor(fun ction () { return set UpDone;}, 'set up', 20000); | |
| 82 | }); | |
| 83 | ||
| 84 | afterE ach(functi on() { | |
| 85 | va r tearDown = false; | |
| 86 | ||
| 87 | ru ns(functio n () { | |
| 88 | jds.save ActiveUser s([], func tion(err) { | |
| 89 | expe ct(err).to BeFalsy(); | |
| 90 | tear Down = tru e; | |
| 91 | }); | |
| 92 | }) ; | |
| 93 | ||
| 94 | wa itsFor(fun ction () { return tea rDown;}, ' tear down' , 20000); | |
| 95 | }); | |
| 96 | ||
| 97 | it('ac tive user found and returned', function( ) { | |
| 98 | va r users; | |
| 99 | ||
| 100 | ru ns(functio n () { | |
| 101 | retrieve r.getAllAc tiveUsers( logger, co nfig, envi ronment, f unction(er ror, resul ts) { | |
| 102 | user s = result s; | |
| 103 | test Done = tru e; | |
| 104 | }); | |
| 105 | }) ; | |
| 106 | ||
| 107 | wa itsFor(fun ction () { return tes tDone;}, ' test done' , 20000); | |
| 108 | ||
| 109 | ru ns(functio n () { | |
| 110 | expect(u sers.lengt h).toBe(1) ; | |
| 111 | }) ; | |
| 112 | }); | |
| 113 | ||
| 114 | it('ac tive user found but on blackli st and not returned' , function () { | |
| 115 | va r initBlac klist = fa lse; | |
| 116 | ||
| 117 | ru ns(functio n () { | |
| 118 | pjds.add ToOsyncBli st('user1' , '9E7A', 'user', fu nction (er ror, respo nse) { | |
| 119 | if ( error) { | |
| 120 | expect(err or).toBeFa lsy(); | |
| 121 | } | |
| 122 | ||
| 123 | expe ct(respons e.statusCo de).toBe(2 01); | |
| 124 | init Blacklist = true; | |
| 125 | }); | |
| 126 | }) ; | |
| 127 | ||
| 128 | wa itsFor(fun ction () { return ini tBlacklist ;}, 'init black list ', 20000); | |
| 129 | ||
| 130 | va r users; | |
| 131 | ||
| 132 | ru ns(functio n () { | |
| 133 | retrieve r.getAllAc tiveUsers( logger, co nfig, envi ronment, f unction(er ror, resul ts) { | |
| 134 | user s = result s; | |
| 135 | test Done = tru e; | |
| 136 | }); | |
| 137 | }) ; | |
| 138 | ||
| 139 | wa itsFor(fun ction () { return tes tDone;}, ' test done' , 20000); | |
| 140 | ||
| 141 | ru ns(functio n () { | |
| 142 | expect(u sers.lengt h).toBe(0) ; | |
| 143 | }) ; | |
| 144 | }); | |
| 145 | ||
| 146 | var cl earBlackli st = false ; | |
| 147 | ||
| 148 | runs(f unction () { | |
| 149 | pj ds.removeF romOsyncBl ist('user1 ', '9E7A', 'user', f unction (e rror, resp onse) { | |
| 150 | if (erro r) { | |
| 151 | expe ct(error). toBeFalsy( ); | |
| 152 | } | |
| 153 | ||
| 154 | expect(r esponse.st atusCode). toBe(200); | |
| 155 | clearBla cklist = t rue; | |
| 156 | }) ; | |
| 157 | }); | |
| 158 | ||
| 159 | waitsF or(functio n () {retu rn clearBl acklist;}, 'clear bl ack list', 20000); | |
| 160 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.