227. EPMO Open Source Coordination Office Redaction File Detail Report

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.

227.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\new-appointment-request\tests\common\views type-of-care-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\new-appointment-request\tests\common\views type-of-care-layout-view-spec.js Fri Dec 7 13:07:36 2018 UTC

227.2 Comparison summary

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

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

227.4 Active regular expressions

No regular expressions were active.

227.5 Comparison detail

  1   define([
  2       'under score',
  3       'backb one',
  4       'app-r esources',
  5       'modul es/appoint ments/appo intments-m odule',
  6       'modul es/new-app ointment-r equest/vie ws/common/ type-of-ca re/layout- view',
  7       'modul es/new-app ointment-r equest/tes ts/helpers /facility- helper',
  8   ], functio n(_, Backb one, resou rces, modu le, View,  helpers) {
  9       'use s trict';
  10  
  11  
  12       functi on resourc eSpy() {
  13           sp yOn(resour ces, 'get' ).and.call Fake(funct ion() {
  14                return { formatHref : _.noop};
  15           }) ;
  16           re turn resou rces.get;
  17       }
  18  
  19  
  20       functi on fetchSp y(data) {
  21           sp yOn(Backbo ne.Collect ion.protot ype, 'fetc h').and.ca llFake(fun ction() {
  22                var defe rred = new  $.Deferre d();
  23                this.set (data, {pa rse: true} );
  24                deferred .resolve(t his);
  25                return d eferred;
  26           }) ;
  27           re turn modul e.fetchCol lection;
  28       }
  29  
  30  
  31       functi on mockDat a() {
  32           re turn [
  33                {
  34                    'id' : '203',
  35                    'nam e': 'Audio logy',
  36                    'obj ectType':  'TypesOfCa re',
  37                    'lin k': [],
  38                },
  39                {
  40                    'id' : '323',
  41                    'nam e': 'Prima ry Care',
  42                    'obj ectType':  'TypesOfCa re',
  43                    'lin k': [],
  44                },
  45                {
  46                    'id' : '408',
  47                    'nam e': 'Optom etry',
  48                    'obj ectType':  'TypesOfCa re',
  49                    'lin k': [],
  50                },
  51                {
  52                    'id' : '502',
  53                    'nam e': 'Outpa tient Ment al Health' ,
  54                    'obj ectType':  'TypesOfCa re',
  55                    'lin k': [],
  56                },
  57                {
  58                    'id' : 'CR1',
  59                    'nam e': 'Expre ss Care',
  60                    'obj ectType':  'TypesOfCa re',
  61                    'lin k': [],
  62                },
  63           ];
  64       }
  65  
  66  
  67       descri be('Step 1  Type of C are', func tion() {
  68  
  69  
  70           /* *
  71              * https:// issues.mob ilehealth. DOMAIN . EX /browse/VA R-9195
  72            *
  73            *  As a user
  74            *  I want to  be able t o select t he specifi c location  where I w ant to rec eive care
  75            *  So that m y booking  process is  streamlin ed focuses  on a smal ler number  of specif ic clinics
  76            *
  77            *  When a us er views t he New App ointment/R equest for m, the “ro uting ques tions” sho wn at the  top part o f the form
  78            *  are revis ed to acco mmodate lo cation lev el booking  as follow s
  79            * /
  80           de scribe('VA R-9195 Spe cification ', functio n() {
  81  
  82  
  83                /**
  84                 * 1.      When the  user view s the page  body, the  following  informati on is show n:
  85                 *
  86                 * 1.1.    A left m argin is s hown on th e body of  the page w ith the la bel: Step  1: Type of  Care show n
  87                 *
  88                 * 1.2.    To the r ight of th e Step 1 l abel, inst ructional  text and t he type of  care fiel d are show n:
  89                 *
  90                 * 1.2.1   Text: Th e VA Appoi ntment App  supports  scheduling  specific  types of c are:
  91                 *
  92                 * 1.2.2   Label: S elect the  type of ca re you nee d: (requir ed)
  93                 *
  94                 * 1.2.3   Drop dow n list box  displays  all types  of care av ailable at  the enter prise leve l (utility
  95                 *         configur ation is n ot applied  to filter  this list );
  96                 *
  97                 * 1.2.4   Primary  care is sh own as the  first sel ection in  the list,  all other  list items  are shown  below
  98                 *         primary  care in al phabetical  order
  99                 */
  100                describe ('1.0.0 -  1.2.4', fu nction() {
  101                    var  view;
  102                    var  gas;
  103  
  104                    befo reEach(fun ction() {
  105                         var region  = helpers .setupTest ingRegion( );
  106                         resourceSp y();
  107                         fetchSpy(m ockData()) ;
  108  
  109                         region.sho w(new View ({
  110                             model:  new Backb one.Model( ),
  111                             google AnalyticsP rovider: {
  112                                 ge tInstance:  function( ) {
  113                                      gas = ja smine.crea teSpyObj(' gas', ['ga s']);
  114                                      return g as;
  115                                 },
  116                             },
  117                         }));
  118  
  119                         view = reg ion.curren tView;
  120  
  121                    });
  122  
  123                    afte rEach(help ers.setupT estingRegi on);
  124  
  125                    it(' show the c orrect mar gin', func tion() {
  126                         var legend  = view.$( '.form-sec tion-headi ng').text( )
  127                             .trim( );
  128                         var arr =  legend.spl it('\n');
  129                         var text;
  130  
  131                         arr = _.ma p(arr, fun ction(item ) {
  132                             return  item.trim ();
  133                         });
  134                         text = arr .join(' ') ;
  135  
  136                         expect(tex t).toBe('S tep 1: Typ e of Care' );
  137                    });
  138  
  139                    it(' shows the  correct in structions ', functio n() {
  140                         var instru ctions = v iew.$('.st ep-instruc tions').te xt()
  141                             .trim( );
  142                         expect(ins tructions) .toBe('The  VA Appoin tments app  supports  scheduling  specific  types of c are. If yo u do not f ind the ca re you nee d, please  contact yo ur facilit y for assi stance.');
  143                    });
  144  
  145                    it(' creates a  dropdown f ull of typ e of care  items', fu nction() {
  146                         var option s = view.$ ('#typeOfC are').chil dren();
  147  
  148                         // collect ion.length  + 1 becau se of the  placeholde r
  149                         expect(opt ions.lengt h).toBe(vi ew.collect ion.length  + 1);
  150                    });
  151  
  152                    it(' always put s primary  care the t op of the  list', fun ction() {
  153                         var option s = view.$ ('#typeOfC are').chil dren();
  154                         var first  = options[ 1];
  155                         var text =  first.inn erText.tri m();
  156  
  157                         expect(tex t).toBe('P rimary Car e');
  158                    });
  159  
  160                    it(' uses alpha betical or der after  primary ca re', funct ion() {
  161                         var option s = view.$ ('#typeOfC are').chil dren();
  162                         var arr =  _.map(opti ons, funct ion(node)  {
  163                             return  node.inne rText.trim ();
  164                         });
  165  
  166                         var afterP rimary = a rr.slice(2 );
  167                         var last =  afterPrim ary.shift( );
  168                         var isG00d  = true;
  169                         var next;
  170  
  171                         while (aft erPrimary. length) {
  172                             next =  afterPrim ary.shift( );
  173                             if (ne xt.localeC ompare(las t) < 1) {
  174                                 is G00d = fal se;
  175                                 br eak;
  176                             }
  177                             last =  next;
  178                         }
  179  
  180                         expect(isG 00d).toBeT ruthy();
  181                    });
  182                });
  183           }) ;
  184  
  185  
  186           de scribe('Co mpleting C overage',  function()  {
  187                var view ;
  188                var data ;
  189                var gas;
  190  
  191                beforeEa ch(functio n() {
  192                    var  region = h elpers.set upTestingR egion();
  193                    var  id;
  194  
  195                    reso urceSpy();
  196                    data  = mockDat a();
  197                    fetc hSpy(data) ;
  198                    id =  data[0].i d;
  199  
  200                    regi on.show(ne w View({
  201                         model: new  Backbone. Model({typ eOfCare: i d}),
  202                         googleAnal yticsProvi der: {
  203                             getIns tance: fun ction() {
  204                                 ga s = jasmin e.createSp yObj('gas' , ['gas']) ;
  205                                 re turn gas;
  206                             },
  207                         },
  208                    }));
  209  
  210                    view  = region. currentVie w;
  211                });
  212  
  213                it('gets  the corre ct name fo r the sele cted type  of care',  function()  {
  214                    var  expected =  data[0].n ame;
  215                    var  actually =  view.getC areName();
  216  
  217                    expe ct(actuall y).toBe(ex pected);
  218                });
  219  
  220                it('getC areName ca n handle t he case th at type is  not selec ted', func tion() {
  221                    view .model.set ('typeOfCa re', 'Does  Not Exits ');
  222  
  223                    expe ct(view.ge tCareName( )).toBe('' );
  224                });
  225  
  226                it('shou ld call Go ogle Analy tics when  the type o f care is  changed',  function()  {
  227                    view .model.set ('typeOfCa re', 'Audi ology');
  228  
  229                    expe ct(gas.gas .calls.fir st().args) .toEqual([ 'send', 'e vent', 've teran-appo intment',  'type-of-c are-select ed', 'Audi ology']);
  230                });
  231           }) ;
  232       });
  233   });
        234   T