Produced by Araxis Merge on 12/7/2018 11:36:03 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\new-appointment-request\tests\requests\views | express-care-reason-section-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\new-appointment-request\tests\requests\views | express-care-reason-section-spec.js | Fri Dec 7 13:07:38 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 166 |
| Changed | 2 | 4 |
| 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 | 'backb one', | |
| 3 | 'Layou t', | |
| 4 | 'App', | |
| 5 | 'modul es/form/qu estion-vie w', | |
| 6 | 'modul es/form/se ction-view ', | |
| 7 | 'modul es/new-app ointment-r equest/vie ws/request s/express- care/secti on-view', | |
| 8 | ], | |
| 9 | function(B ackbone, L ayout, app , Question View, Sect ionView, E xpressCare ReasonSect ionView) { | |
| 10 | 'use s trict'; | |
| 11 | ||
| 12 | descri be('Expres s Care Rea son Sectio n View', f unction() { | |
| 13 | va r view; | |
| 14 | va r $view; | |
| 15 | va r layout = new Layou t(); | |
| 16 | la yout.rende r(); | |
| 17 | ||
| 18 | be foreEach(f unction() { | |
| 19 | spyOn(Qu estionView .prototype , 'addForm Validation Rules'); | |
| 20 | spyOn(Se ctionView. prototype, 'hideVali dationErro rsFor'); | |
| 21 | ||
| 22 | view = n ew Express CareReason SectionVie w({ | |
| 23 | mode l: new Bac kbone.Mode l(), | |
| 24 | reas ons: new B ackbone.Co llection([ | |
| 25 | { | |
| 26 | id: '0 ', | |
| 27 | name: 'Sluggishn ess', | |
| 28 | }, | |
| 29 | { | |
| 30 | id: '1 ', | |
| 31 | name: 'Allergic Reaction', | |
| 32 | }, | |
| 33 | { | |
| 34 | id: 'Z Z', | |
| 35 | name: 'Other', | |
| 36 | }, | |
| 37 | ]), | |
| 38 | }); | |
| 39 | layout.sho wChildView ('f DNS tent', vie w); | |
| 40 | $view = view.$el; | |
| 41 | }) ; | |
| 42 | af terEach(fu nction() { | |
| 43 | layout.get Region('f DNS tent').emp ty(); | |
| 44 | }) ; | |
| 45 | it ('initiali zes with a ll questio ns', funct ion() { | |
| 46 | expect(v iew.collec tion.lengt h).toEqual (3); | |
| 47 | expect(v iew.collec tion.at(0) .id).toEqu al('reason ForVisit') ; | |
| 48 | expect(v iew.collec tion.at(0) .get('type ')).toEqua l('select' ); | |
| 49 | expect(v iew.collec tion.at(0) .get('labe l')).toEqu al('Reason for Visit :'); | |
| 50 | ||
| 51 | expect(v iew.collec tion.at(1) .id).toEqu al('otherR easonForVi sit'); | |
| 52 | expect(v iew.collec tion.at(1) .get('type ')).toEqua l('text'); | |
| 53 | expect(v iew.collec tion.at(1) .get('labe l')).toEqu al('Other Reason:'); | |
| 54 | ||
| 55 | expect(v iew.collec tion.at(2) .id).toEqu al('additi onalInform ation'); | |
| 56 | expect(v iew.collec tion.at(2) .get('type ')).toEqua l('textare a'); | |
| 57 | expect(v iew.collec tion.at(2) .get('maxl ength')).t oEqual(250 ); | |
| 58 | expect(v iew.collec tion.at(2) .get('labe l')).toEqu al('Additi onal Infor mation'); | |
| 59 | }) ; | |
| 60 | ||
| 61 | it ('has inst ructions', function( ) { | |
| 62 | expect($ view.find( '.express- care-instr uctions'). text()).to Equal('Exp ress Care visits are available only for certain ca ses.'); | |
| 63 | }) ; | |
| 64 | ||
| 65 | it ('initiall y hides th e Other Re ason quest ion', func tion() { | |
| 66 | expect($ view.find( '.other-qu estion').i s('.hidden ')).toBe(t rue); | |
| 67 | }) ; | |
| 68 | ||
| 69 | it ("shows th e Other Re ason quest ion when ' Other' is selected", function( ) { | |
| 70 | $view.fi nd('#reaso nForVisit' ).val('ZZ' ) | |
| 71 | .tri gger('chan ge'); | |
| 72 | expect($ view.find( '.other-qu estion').i s('.hidden ')).toBe(f alse); | |
| 73 | }) ; | |
| 74 | ||
| 75 | it ('hides th e Other Re ason quest ion when a nother Rea son is sel ected', fu nction() { | |
| 76 | $view.fi nd('#reaso nForVisit' ).val('ZZ' ) | |
| 77 | .tri gger('chan ge'); | |
| 78 | expect($ view.find( '.other-qu estion').i s('.hidden ')).toBe(f alse); | |
| 79 | ||
| 80 | $view.fi nd('#reaso nForVisit' ).val('1') | |
| 81 | .tri gger('chan ge'); | |
| 82 | expect($ view.find( '.other-qu estion').i s('.hidden ')).toBe(t rue); | |
| 83 | }) ; | |
| 84 | }); | |
| 85 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.