Produced by Araxis Merge on 12/7/2018 11:36:01 AM Central Standard 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 | C:\SCRUB\MHED\MHED\VAR 4.10.0\var-web-release-4.10@e10f18de1ef\veteran-appointment-requests\app\modules\appointments\messages | request-message-view-spec.js | Mon Oct 22 23:25:20 2018 UTC |
| 2 | C:\MHED-scrubbed\MHED\MHED\VAR 4.10.0\var-web-release-4.10@e10f18de1ef\veteran-appointment-requests\app\modules\appointments\messages | request-message-view-spec.js | Fri Dec 7 13:07:14 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 232 |
| Changed | 1 | 2 |
| 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 | define([ | |
| 2 | 'jquer y', | |
| 3 | 'under score', | |
| 4 | 'backb one', | |
| 5 | 'Layou t', | |
| 6 | 'modul es/appoint ments/mess ages/reque st-message -view', | |
| 7 | 'modul es/notific ation-pref erences/no tification -preferenc es-module' , | |
| 8 | 'modul es/appoint ments/appo intments-r adio', | |
| 9 | 'modul es/appoint ments/mess ages/reque st-message ', | |
| 10 | 'modul es/new-app ointment-r equest/tes ts/helpers /general-h elper', | |
| 11 | ], functio n($, _, Ba ckbone, La yout, View , notifica tionModule , radio, M essageMode l, helpers ) { | |
| 12 | 'use s trict'; | |
| 13 | ||
| 14 | descri be('Reques t Message View', fun ction() { | |
| 15 | va r view; | |
| 16 | va r layout = new Layou t(); | |
| 17 | ||
| 18 | la yout.rende r(); | |
| 19 | be foreEach(f unction () { | |
| 20 | view = n ew View(ne w Backbone .Model({ | |
| 21 | serv ice: 'serv ice', | |
| 22 | trav elBurden: true, | |
| 23 | unus ualTravelB urden: fal se, | |
| 24 | type OfCareId: 'CCUD', | |
| 25 | faci lity: 'Bos ton', | |
| 26 | zipC ode: '0203 3', | |
| 27 | dist anceWillin gToTravel: '10', | |
| 28 | opti onDate1: ' 11/08/2014 ', | |
| 29 | opti onTime1: ' AM', | |
| 30 | opti onDate2: ' No Date Se lected', | |
| 31 | opti onTime2: ' No Time Se lected', | |
| 32 | opti onDate3: ' No Date Se lected', | |
| 33 | opti onTime3: ' No Time Se lected', | |
| 34 | phon eNumber: ' 703-234-56 70', | |
| 35 | best TimetoCall : [ | |
| 36 | 'Afternoon ', | |
| 37 | 'Evening', | |
| 38 | ], | |
| 39 | requ estedPhone Call: true , | |
| 40 | prov iderOption : 'Call be fore booki ng appoint ment', | |
| 41 | visi tType: 'Of fice Visit ', | |
| 42 | appo intmentTyp e: 'Audiol ogy', | |
| 43 | reas onForVisit : 'Placeho lder until the form has a reas on for vis it!', | |
| 44 | emai l: 'joe@jo e.com', | |
| 45 | purp oseOfVisit : 'routine -follow-up ', | |
| 46 | prov iderId: '0 ', | |
| 47 | pati entIdentif ier: { | |
| 48 | uniqueId: '1', | |
| 49 | assigningA uthority: 'xxx', | |
| 50 | }, | |
| 51 | })); | |
| 52 | ||
| 53 | layout.sho wChildView ('f DNS tent', vie w); | |
| 54 | }) ; | |
| 55 | de scribe('na vigateToRe questDetai ls', funct ion() { | |
| 56 | it('call s the corr ect redire ct radio r equest', f unction() { | |
| 57 | var isCalled = false; | |
| 58 | var model = ne w Backbone .Model({cl inic: {}}) ; | |
| 59 | radi o.once('ap pointments :request:s elected', function(d etails, op tions) { | |
| 60 | isCalled = true; | |
| 61 | expect(det ails).toBe (model); | |
| 62 | expect(opt ions.showF eedbackLin k).toBeTru thy(); | |
| 63 | expect(opt ions.showC ancellatio n).toBeFal sy(); | |
| 64 | }); | |
| 65 | ||
| 66 | view .navigateT oRequestDe tails(mode l); | |
| 67 | expe ct(isCalle d).toBe(tr ue); | |
| 68 | }); | |
| 69 | }) ; | |
| 70 | de scribe('ch eckForMess age', func tion() { | |
| 71 | var mode l; | |
| 72 | ||
| 73 | beforeEa ch(functio n() { | |
| 74 | spyO n(view, 's aveRequest Message'). and.callFa ke(_.noop) ; | |
| 75 | spyO n(view, 'n avigateToR equestDeta ils').and. callFake(_ .noop); | |
| 76 | mode l = new Ba ckbone.Mod el({link: [{rel: 'se lf'}]}); | |
| 77 | }); | |
| 78 | ||
| 79 | it('save s the cust om message before re direct', f unction() { | |
| 80 | mode l.set('new Message', 'test', {s ilent: tru e}); | |
| 81 | view .checkForM essage(mod el); | |
| 82 | ||
| 83 | expe ct(view.sa veRequestM essage).to HaveBeenCa lled(); | |
| 84 | }); | |
| 85 | ||
| 86 | it('goes right to details wh en there i s no new m essage', f unction() { | |
| 87 | view .checkForM essage(mod el); | |
| 88 | ||
| 89 | expe ct(view.na vigateToRe questDetai ls).toHave BeenCalled (); | |
| 90 | }); | |
| 91 | }) ; | |
| 92 | de scribe('sa veRequestM essage', f unction() { | |
| 93 | var mess age; | |
| 94 | var requ est; | |
| 95 | var user Id; | |
| 96 | ||
| 97 | beforeEa ch(functio n() { | |
| 98 | spyO n(MessageM odel.proto type, 'sav eMessage') .and.callF ake(functi on(_messag e, _reques t, _userId ) { | |
| 99 | message = _message; | |
| 100 | request = _request; | |
| 101 | userId = _ userId; | |
| 102 | }); | |
| 103 | }); | |
| 104 | ||
| 105 | it('call s the mess age Model save funct ion with t he correct params', function() { | |
| 106 | var m = 'This is a test of the eme rgency bla h blah bla h'; | |
| 107 | var r = new Ba ckbone.Mod el(); | |
| 108 | var u = view.r equestMode l.get('pat ientIdenti fier').uni queId; | |
| 109 | view .saveReque stMessage( m, r); | |
| 110 | ||
| 111 | expe ct(message ).toBe(m); | |
| 112 | expe ct(request ).toBe(r); | |
| 113 | expe ct(userId) .toBe(u); | |
| 114 | }); | |
| 115 | }) ; | |
| 116 | }); | |
| 117 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.