213. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/7/2018 11:36:02 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.

213.1 Files compared

# Location File Last Modified
1 C:\SCRUB\MHED\MHED\VAR 4.10.0\var-web-release-4.10@e10f18de1ef\veteran-appointment-requests\app\modules\community-care-request\new-appointment-request-question\notification-selection community-care-notification-settings-layout-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\community-care-request\new-appointment-request-question\notification-selection community-care-notification-settings-layout-view_spec.js Fri Dec 7 13:07:18 2018 UTC

213.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 298
Changed 1 2
Inserted 0 0
Removed 0 0

213.3 Comparison options

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

213.4 Active regular expressions

No regular expressions were active.

213.5 Comparison detail

  1   /* eslint- disable ma x-len */
  2   define([
  3       'under score',
  4       'backb one',
  5       'Layou t',
  6       'modul es/communi ty-care-re quest/new- appointmen t-request- question/n otificatio n-selectio n/communit y-care-not ification- settings-l ayout-view ',
  7       'modul es/communi ty-care-re quest/new- appointmen t-request- question/n otificatio n-selectio n/request- details/re quest-deta ils-phone- contact-se ction-view ',
  8       'modul es/new-app ointment-r equest/vie ws/common/ email/sect ion-view',
  9   ],
  10   function(_ , Backbone , Layout,  CCNotifica tionSettin gsLayout,  PhoneConta ctSectionV iew, Email Preference sSectionVi ew) {
  11       'use s trict';
  12       descri be('Notifi cation/Req uest View  Section',  function()  {
  13           va r view;
  14           va r model;
  15           va r collecti on;
  16           va r $view;
  17           va r ccReques tModel;
  18           va r layout;
  19  
  20           be foreEach(f unction ()  {
  21                model =  new Backbo ne.Model({
  22                    step s: [1, 2,  3, 4, 5, 6 ],
  23                });
  24                
  25                collecti on = new B ackbone.Co llection(
  26                    [
  27                         {
  28                             name:  'ONE VAMC' ,
  29                             testIt em: 'PVS-A LPHA-99',
  30                             facili tyCode: '1 00',
  31                             suppor tsVAR: tru e,
  32                         },
  33                         {
  34                             name:  'TWO VAMC' ,
  35                             testIt em: 'PVS-B ETA-01',
  36                             facili tyCode: '2 00',
  37                             suppor tsVAR: fal se,
  38                         },
  39                    ]
  40                );
  41  
  42                layout =  new Layou t();
  43  
  44                layout.r ender();
  45                ccReques tModel = n ew Backbon e.Model({
  46                    serv ice: 'serv ice',
  47                    trav elBurden:  true,
  48                    unus ualTravelB urden: fal se,
  49                    type OfCareId:  'CCUD',
  50                    faci lity: 'Bos ton',
  51                    zipC ode: '0203 3',
  52                    dist anceWillin gToTravel:  '10',
  53                    opti onDate1: ' 11/08/2014 ',
  54                    opti onTime1: ' AM',
  55                    opti onDate2: ' No Date Se lected',
  56                    opti onTime2: ' No Time Se lected',
  57                    opti onDate3: ' No Date Se lected',
  58                    opti onTime3: ' No Time Se lected',
  59                    phon eNumber: ' 703-234-56 70',
  60                    pref erredProvi ders: {
  61                         provider1:  '',
  62                    },
  63                    best TimetoCall : [
  64                         'Afternoon ',
  65                         'Evening',
  66                    ],
  67                    requ estedPhone Call: true ,
  68                    prov iderOption : 'Call be fore booki ng appoint ment',
  69                    visi tType: 'Of fice Visit ',
  70                    appo intmentTyp e: 'Audiol ogy',
  71                    reas onForVisit : 'Placeho lder until  the form  has a reas on for vis it!',
  72                    emai l: 'joe@jo e.com',
  73                    purp oseOfVisit : 'routine -follow-up ',
  74                    prov iderId: '0 ',
  75                    pati entIdentif ier: {
  76                         uniqueId:  '1',
  77                         assigningA uthority:  'xxx',
  78                    },
  79                });
  80                spyOn(CC Notificati onSettings Layout.pro totype, 'd isableCont inueButton ');
  81                spyOn(CC Notificati onSettings Layout.pro totype, 'h andleModel Change');
  82                spyOn(CC Notificati onSettings Layout.pro totype, 's aveSetting s');
  83                spyOn(CC Notificati onSettings Layout.pro totype, 's aveCommuni tyCareRequ ests');
  84                spyOn(CC Notificati onSettings Layout.pro totype, 's aveEmailPr eferences' );
  85                spyOn(Em ailPrefere ncesSectio nView.prot otype, 'in itialize') .and.callF ake(functi on() {
  86                    this .collectio n = new Ba ckbone.Col lection();
  87                    this .model = n ew Backbon e.Model();
  88                });
  89                view = n ew CCNotif icationSet tingsLayou t({
  90                    mode l: model,
  91                    pati entEnrolle dFacilitie s: collect ion,
  92                });
  93                view.ema ilPreferen cesModel =  new Backb one.Model( {
  94                    emai lAddress:  'test123@j oe.com',
  95                });
  96  
  97                  layout.sho wChildView ('f DNS     tent', vie w);
  98                $view =  view.$el;
  99           }) ;
  100  
  101           it ('has regi ons to sho w form sec tions', fu nction ()  {
  102                expect($ view.has(v iew.region s.communit yCareSetti ngs).lengt h).toEqual (1);
  103                expect($ view.has(v iew.region s.emailPre ferencesRe gion).leng th).toEqua l(1);
  104           }) ;
  105  
  106           it ('initiate s the requ ests when  submit req uest butto n is click ed', funct ion() {
  107                $view.fi nd('#submi t-btn').cl ick();
  108                expect(v iew.saveSe ttings).to HaveBeenCa lled();
  109           }) ;
  110  
  111           de scribe('sh ould rende r the view ', functio n() {
  112                it('shou ld disable  button wh en view is  rednered  and check  if the mod el has cha nged', fun ction() {
  113                    jasm ine.create Spy('show' ).and.call Fake(funct ion(_view)  {
  114                         expect(_vi ew.show).t oHaveBeenC alled();
  115                         expect(_vi ew.handleM odelChange ).toHaveBe enCalled() ;
  116                    });
  117                });
  118           }) ;
  119  
  120           de scribe('ma kes the re quests for  the Commu nity Care  Appointmen t', functi on() {
  121                it('shou ld start w ith commun ity care r equests an d then not ification  preference s', functi on() {
  122                    jasm ine.create Spy('saveS ettings'). and.callFa ke(functio n() {
  123                         expect(vie w.saveComm unityCareR equests).t oHaveBeenC alledWith( ccRequestM odel);
  124                         expect(vie w.saveEmai lPreferenc es).toHave BeenCalled ();
  125                    });
  126                });
  127  
  128                it('shou ld set up  for the re quests mod el for com munity car e ', funct ion() {
  129                    jasm ine.create Spy('forma tCommunity CareReques ts').and.c allFake(fu nction(_cc RequestMod el) {
  130                         expect(_cc RequestMod el).toBe(_ ccRequestM odel);
  131                    });
  132                });
  133           }) ;
  134  
  135           de scribe('Wh en creatin g the Comm unity Care  model', f unction()  {
  136                it('will  set dista nceEligibl e to true  when it is  not set',  function( ) {
  137                    var  formattedR equest;
  138                    form attedReque st = view. formatComm unityCareR equests(cc RequestMod el);
  139                    expe ct(formatt edRequest. get('dista nceEligibl e')).toBe( true);
  140                });
  141  
  142                it('will  set dista nceEligibl e to true  when set t o yes', fu nction() {
  143                    var  formattedR equest;
  144                    ccRe questModel .set('dist anceEligib le', 'Yes' );
  145                    form attedReque st = view. formatComm unityCareR equests(cc RequestMod el);
  146                    expe ct(formatt edRequest. get('dista nceEligibl e')).toBe( true);
  147                });
  148           }) ;
  149       });
  150   });