216. 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.

216.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\request-preferences community-care-appointment-preferences-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\request-preferences community-care-appointment-preferences-layout-view-spec.js Fri Dec 7 13:07:18 2018 UTC

216.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 7 280
Changed 6 12
Inserted 0 0
Removed 0 0

216.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

216.4 Active regular expressions

No regular expressions were active.

216.5 Comparison detail

  1   // normall y the mode l is passe d to the v iew instea d of the v iew creati ng the mod el
  2   define([
  3       'backb one',
  4       'mario nette',
  5       'momen t',
  6       'Layou t',
  7       'modul es/communi ty-care-re quest/new- appointmen t-request- question/r equest-pre ferences/c ommunity-c are-appoin tment-pref erences-la yout-view' ,
  8   ],
  9   function(
  10       Backbo ne,
  11       Marion ette,
  12       moment ,
  13       Layout ,
  14       Layout View
  15   ) {
  16       'use s trict';
  17       descri be('appoin tment pref erences La yout', fun ction () {
  18           de scribe('sh ows commun ity-care a ppointment  preferenc es layout  view', fun ction () {
  19  
  20                var view ;
  21                var layo ut;
  22                var toda y;
  23                var earl iestDate;
  24                var late stDate;
  25  
  26                beforeEa ch(functio n() {
  27                    // T ODO move t hese three  initializ e statemen ts to befo reAll once  merged
  28                    toda y = moment (new Date( )).add(6,  'days');
  29                    earl iestDate =  moment(ne w Date()). add(5, 'da ys');
  30                    late stDate = m oment(new  Date()).ad d(90, 'day s');
  31                    layo ut = new L ayout();
  32                    layo ut.render( );
  33                    spyO n(LayoutVi ew.prototy pe, 'showR egions').a nd.callThr ough();
  34                    spyO n(LayoutVi ew.prototy pe, 'handl eModelChan ge').and.c allThrough ();
  35                    spyO n(LayoutVi ew.prototy pe, 'disab leContinue Button').a nd.callThr ough();
  36                    spyO n(LayoutVi ew.prototy pe, 'enabl eContinueB utton');
  37  
  38                });
  39                afterEac h(function () {
  40                      layout.get Region('f DNS     tent').emp ty();
  41                });
  42  
  43                it('when  empty all  required  fields sho w required  errors',  function()  {
  44                    var  model = ne w Backbone .Model({
  45                         'steps': [ 5],
  46                    });
  47                    view  = new Lay outView({
  48                         model: mod el,
  49                         validator:  layout.va lidator,
  50                    });
  51                      layout.sho wChildView ('f DNS     tent', vie w);
  52                    expe ct(view.ha ndleModelC hange).toH aveBeenCal led();
  53                    expe ct(view.di sableConti nueButton) .toHaveBee nCalled();
  54                    expe ct(view.va lidator.er rorList.le ngth).toEq ual(1);
  55                    expe ct(view.va lidator.er rorList[0] .message). toEqual('C hoice #1 D ate field  is require d.');
  56                });
  57                it('uniq ue date er rors when  three of t he same da tes are pi cked', fun ction() {
  58                    var  model = ne w Backbone .Model({
  59                         'optionTim e1': 'AM',
  60                         'optionDat e1': momen t(today).f ormat('MM/ DD/YYYY'),
  61                         'optionDat e2': momen t(today).f ormat('MM/ DD/YYYY'),
  62                         'optionDat e3': momen t(today).f ormat('MM/ DD/YYYY'),
  63                         'steps': [ 5],
  64                         'careType' : 'if you  don\'t hav e this its  a va requ est',
  65                         'sectionNu mber': 1,
  66                    });
  67                    view  = new Lay outView({
  68                         model: mod el,
  69                         validator:  layout.va lidator,
  70                    });
  71                      layout.sho wChildView ('f DNS     tent', vie w);
  72                    expe ct(view.ha ndleModelC hange).toH aveBeenCal led();
  73                    expe ct(view.di sableConti nueButton) .toHaveBee nCalled();
  74                    // 3  non uniqu e dates
  75                    expe ct(view.va lidator.er rorList.le ngth).toEq ual(3);
  76                    expe ct(view.va lidator.er rorList[0] .message). toEqual('T he Date En tered is n ot unique. ');
  77                    expe ct(view.va lidator.er rorList[1] .message). toEqual('T he Date En tered is n ot unique. ');
  78                    expe ct(view.va lidator.er rorList[2] .message). toEqual('T he Date En tered is n ot unique. ');
  79  
  80                });
  81                it('inva lid date s hows error s', functi on() {
  82                    var  model = ne w Backbone .Model({
  83                         'optionTim e1': 'AM',
  84                         'optionDat e1': '777' ,
  85                         'preferred Zipcode':  99999,
  86                         'preferred Miles': 10 0,
  87                         'steps': [ 5],
  88                    });
  89                    view  = new Lay outView({
  90                         model: mod el,
  91                         validator:  layout.va lidator,
  92                    });
  93                      layout.sho wChildView ('f DNS     tent', vie w);
  94                    expe ct(view.ha ndleModelC hange).toH aveBeenCal led();
  95                    expe ct(view.di sableConti nueButton) .toHaveBee nCalled();
  96                    // 2  non uniqu e dates, z ip and mil e are requ ired but n ot in the  model
  97                    expe ct(view.va lidator.er rorList.le ngth).toEq ual(1);
  98                    expe ct(view.va lidator.er rorList[0] .message). toEqual('P lease ente r a valid  Date.');
  99                });
  100  
  101                it('inRa nge date s hows error s', functi on() {
  102                    var  model = ne w Backbone .Model({
  103                         'optionTim e1': 'AM',
  104                         'optionDat e1': '07/0 4/1776',
  105                         'preferred Zipcode':  99999,
  106                         'preferred Miles': 10 0,
  107                         'steps': [ 5],
  108                    });
  109                    view  = new Lay outView({
  110                         model: mod el,
  111                         validator:  layout.va lidator,
  112                    });
  113                      layout.sho wChildView ('f DNS     tent', vie w);
  114  
  115                    expe ct(view.ha ndleModelC hange).toH aveBeenCal led();
  116                    expe ct(view.di sableConti nueButton) .toHaveBee nCalled();
  117                    // 2  non uniqu e dates, z ip and mil e are requ ired but n ot in the  model
  118                    expe ct(view.va lidator.er rorList.le ngth).toEq ual(1);
  119                    expe ct(view.va lidator.er rorList[0] .message). toEqual('P lease ente r a date b etween '
  120                         + moment(e arliestDat e).format( 'MM/DD/YYY Y') + ' an d '
  121                         + moment(l atestDate) .format('M M/DD/YYYY' ) + '.');
  122                });
  123  
  124                it('with  no errors ', functio n() {
  125                    var  model = ne w Backbone .Model({
  126                         'optionTim e1': 'AM',
  127                         'optionDat e1': momen t(today).f ormat('MM/ DD/YYYY'),
  128                         'preferred Zipcode':  99999,
  129                         'preferred Miles': 10 0,
  130                         'steps': [ 5],
  131                    });
  132                    view  = new Lay outView({
  133                         model: mod el,
  134                         validator:  layout.va lidator,
  135                    });
  136                      layout.sho wChildView ('f DNS     tent', vie w);
  137                    expe ct(view.ha ndleModelC hange).toH aveBeenCal led();
  138                    expe ct(view.en ableContin ueButton). toHaveBeen Called();
  139                    // n o errors
  140                    expe ct(view.va lidator.er rorList.le ngth).toEq ual(0);
  141                    // 3  valid dat es (1 fill ed, 2 empt y) 2 valid  answered  questions.
  142                    expe ct(view.va lidator.su ccessList. length).to Equal(3);
  143                });
  144           }) ;
  145       });
  146   });