2675. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/10/2018 8:40:52 AM Central Daylight 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.

2675.1 Files compared

# Location File Last Modified
1 MHED_APPS_CIF.zip\VAR v4.2.7\var-web-4.2.7@0810ae549c1.zip\veteran-appointment-requests\app\modules\new-appointment-request\tests\common\views type-of-care-layout-view-spec.js Mon Apr 9 06:06:53 2018 UTC
2 MHED_APPS_CIF.zip\VAR v4.2.7\var-web-4.2.7@0810ae549c1.zip\veteran-appointment-requests\app\modules\new-appointment-request\tests\common\views type-of-care-layout-view-spec.js Thu May 3 13:36:16 2018 UTC

2675.2 Comparison summary

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

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

2675.4 Active regular expressions

No regular expressions were active.

2675.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. DNS     /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  
  103                    befo reEach(fun ction() {
  104                         var region  = helpers .setupTest ingRegion( );
  105                         resourceSp y();
  106                         fetchSpy(m ockData()) ;
  107  
  108                         region.sho w(new View ({model: n ew Backbon e.Model()} ));
  109  
  110                         view = reg ion.curren tView;
  111  
  112                    });
  113  
  114                    afte rEach(help ers.setupT estingRegi on);
  115  
  116                    it(' show the c orrect mar gin', func tion() {
  117                         var legend  = view.$( '.form-sec tion-headi ng').text( )
  118                             .trim( );
  119                         var arr =  legend.spl it('\n');
  120                         var text;
  121  
  122                         arr = _.ma p(arr, fun ction(item ) {
  123                             return  item.trim ();
  124                         });
  125                         text = arr .join(' ') ;
  126  
  127                         expect(tex t).toBe('S tep 1: Typ e of Care' );
  128                    });
  129  
  130                    it(' shows the  correct in structions ', functio n() {
  131                         var instru ctions = v iew.$('.st ep-instruc tions').te xt()
  132                             .trim( );
  133                         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.');
  134                    });
  135  
  136                    it(' creates a  dropdown f ull of typ e of care  items', fu nction() {
  137                         var option s = view.$ ('#typeOfC are').chil dren();
  138  
  139                         // collect ion.length  + 1 becau se of the  placeholde r
  140                         expect(opt ions.lengt h).toBe(vi ew.collect ion.length  + 1);
  141                    });
  142  
  143                    it(' always put s primary  care the t op of the  list', fun ction() {
  144                         var option s = view.$ ('#typeOfC are').chil dren();
  145                         var first  = options[ 1];
  146                         var text =  first.inn erText.tri m();
  147  
  148                         expect(tex t).toBe('P rimary Car e');
  149                    });
  150  
  151                    it(' uses alpha betical or der after  primary ca re', funct ion() {
  152                         var option s = view.$ ('#typeOfC are').chil dren();
  153                         var arr =  _.map(opti ons, funct ion(node)  {
  154                             return  node.inne rText.trim ();
  155                         });
  156  
  157                         var afterP rimary = a rr.slice(2 );
  158                         var last =  afterPrim ary.shift( );
  159                         var isG00d  = true;
  160                         var next;
  161  
  162                         while (aft erPrimary. length) {
  163                             next =  afterPrim ary.shift( );
  164                             if (ne xt.localeC ompare(las t) < 1) {
  165                                 is G00d = fal se;
  166                                 br eak;
  167                             }
  168                             last =  next;
  169                         }
  170  
  171                         expect(isG 00d).toBeT ruthy();
  172                    });
  173                });
  174           }) ;
  175  
  176  
  177           de scribe('Co mpleting C overage',  function()  {
  178                var view ;
  179                var data ;
  180  
  181                beforeEa ch(functio n() {
  182                    var  region = h elpers.set upTestingR egion();
  183                    var  id;
  184  
  185                    reso urceSpy();
  186                    data  = mockDat a();
  187                    fetc hSpy(data) ;
  188                    id =  data[0].i d;
  189  
  190                    regi on.show(ne w View({mo del: new B ackbone.Mo del({typeO fCare: id} )}));
  191  
  192                    view  = region. currentVie w;
  193                });
  194  
  195                it('gets  the corre ct name fo r the sele cted type  of care',  function()  {
  196                    var  expected =  data[0].n ame;
  197                    var  actually =  view.getC areName();
  198  
  199                    expe ct(actuall y).toBe(ex pected);
  200                });
  201  
  202                it('getC areName ca n handle t he case th at type is  not selec ted', func tion() {
  203                    view .model.set ('typeOfCa re', 'Does  Not Exits ');
  204  
  205                    expe ct(view.ge tCareName( )).toBe('' );
  206                });
  207           }) ;
  208       });
  209   });