306. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 2/4/2019 11:34:06 AM Eastern 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.

306.1 Files compared

# Location File Last Modified
1 MHPRO_v1.x.zip\mhpro-web-master@18b10e0e051.zip\app\common\js\test veteran-authenticated.js Wed Dec 20 15:17:09 2017 UTC
2 MHPRO_v1.x.zip\mhpro-web-master@18b10e0e051.zip\app\common\js\test veteran-authenticated.js Fri Feb 1 20:43:47 2019 UTC

306.2 Comparison summary

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

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

306.4 Active regular expressions

No regular expressions were active.

306.5 Comparison detail

  1   App_Resour ces.hostna me = "http s:// DNS .vamisece. io/";
  2   App.TestRe sources =  function ( ) {
  3       var re ady = 0;
  4       var re adyCheck =  function  () {
  5           if  (ready == = 2) { //  set to 2
  6                App.vent .trigger(' test_resou rces:loade d');
  7           }
  8       }
  9       var su ccessMustS tart = fun ction () {
  10           MH PRO.Resour ces.HAReso urces = ne w MHPRO.Co llection.H AResources ();
  11           MH PRO.Resour ces.HAReso urces.fetc h({ succes s: success Handler }) ;
  12  
  13           MH PRO.Resour ces.MHPROR esources =  new MHPRO .Collectio n.MHPRORes ources();
  14           MH PRO.Resour ces.MHPROR esources.f etch({ suc cess: succ essHandler  });
  15       };
  16       var su ccessHandl er = funct ion (colle ction, res ponse, opt ions) {
  17           re ady++;
  18           re adyCheck() ;
  19       };
  20       MHPRO. Resources. App = new  App_Resour ces.Collec tion.AppRe sources(MH PRO_Data.r esource_di rectory.li nks);
  21       succes sMustStart ();
  22   };
  23  
  24   describe(" User in Au thenticate d State: " , function  () {
  25       descri be("Resour ces", func tion () {
  26           va r resource sLoaded =  false;
  27           be foreEach(f unction (d one) {
  28                App.vent .on('test_ resources: loaded', f unction ()  {
  29                    reso urcesLoade d = true;
  30                    done ();
  31                });
  32                if (!res ourcesLoad ed) {
  33                    App. TestResour ces();
  34                }
  35                else { d one(); }
  36           }) ;
  37           it ('Resource s Should b e loaded.' , function  () {
  38                expect(r esourcesLo aded).toBe (true);
  39           }) ;
  40       });
  41       descri be("Eula N ot Accepte d", functi on () {
  42           be foreEach(f unction (d one) {
  43                App_Util s.DeleteLo calStorage ('MHPRO_Eu la');
  44                done();
  45           }) ;
  46           it ('Eula sho uld not ex ist', func tion () {
  47                expect(A pp_Utils.G etLocalSto rage('MHPR O_Eula')). toBe(null) ;
  48           }) ;
  49       });
  50       descri be("Eula A ccepted",  function ( ) {
  51           be foreEach(f unction (d one) {
  52                App_Util s.DeleteLo calStorage ('MHPRO_Eu la');
  53                App.vent .on('eula: shown', fu nction ()  {
  54                    App_ Utils.SetL ocalStorag e('MHPRO_E ula', { ac cept_date:  new Date( ).getTime( ) });
  55                    MHPR O.View.Eul a.hide();
  56                })
  57                App.vent .on('eula: hidden', f unction ()  {
  58                    MHPR O.Layout.h eader.show (MHPRO.Vie w.header =  new MHPRO .View.Head er());
  59                    MHPR O.Layout.f ooter.show (new MHPRO .View.foot er());
  60                    MHPR O.Router =  new MHPRO .Router();
  61                    Back bone.histo ry.start() ;
  62                    done ();
  63                });
  64                App.chec kEula();
  65           }) ;
  66           it ('Eula sho uld be set ', functio n () {
  67                expect(A pp_Utils.G etLocalSto rage('MHPR O_Eula')). not.toEqua l(null);
  68           }) ;
  69       });
  70       descri be("Fetch  User objec t", functi on () {
  71           va r user = { };
  72           va r userLoad ed = false ;
  73           be foreEach(f unction (d one) {
  74                //Set Au thorize Re quest head er
  75                App_Util s.SetReque stHeader() ;
  76                if (user Loaded) {  done(); }
  77                App.vent .on('user: loaded', f unction ()  {
  78                    user Loaded = t rue;
  79                    user  = MHPRO.M odel.User. toJSON();
  80                    done ();
  81                });
  82                App.vent .on('user: failed', f unction ()  { done();  });
  83                //Trigge r event to  load user
  84                App.vent .trigger(' load:user' , { init:  true });
  85           }) ;
  86           it ('Users ob ject shoul d contain  mhpuser',  function ( ) {
  87                expect(u ser.mhpuse r).toHaveD ata();
  88           }) ;
  89       });
  90       descri be("Last A ccessed Ti me should  be set", f unction ()  {
  91           be foreEach(f unction (d one) {
  92                App.vent .on('lastA ccessedTim e:success' , function  () { done (); });
  93                App.vent .on('lastA ccessedTim e:failed',  function  () { done( ); });
  94           }) ;
  95           it ('App.Keep AliveTimeL eft greate r than 0',  function  () {
  96                expect(A pp.KeepAli veTimeLeft ).toBeGrea terThan(89 0);
  97           }) ;
  98       });
  99       descri be("Modal  shown at 2  minutes b efore time out", func tion () {
  100           be foreEach(f unction (d one) {
  101                App.vent .on('timeo utModal:vi sible', fu nction ()  {
  102                    done ();
  103                });
  104                App.Keep AliveTimeL eft = 119;
  105           }) ;
  106           it ('Time out  Modal sho uld be vis ible', fun ction () {
  107                expect(c ontainer.f ind('#time out-modal' )).toHaveC lass("in") ;
  108           }) ;
  109           af terEach(fu nction ()  {
  110                App.Keep AliveTimeL eft = 900;
  111           }) ;
  112       });   
  113       descri be("Histor ical Graph s", functi on () {
  114           va r viewRend ered = fal se;
  115           be foreEach(f unction (d one) {
  116                if (!vie wRendered)  {
  117                    MHPR O.Router.n avigate("h istoricalG raphs", {
  118                         trigger: t rue,
  119                         replace: t rue
  120                    });
  121                    view Rendered =  true;
  122                    done ();
  123                }
  124                else {
  125                    done ();
  126                }
  127           }) ;
  128           de scribe("Da te Range(s )", functi on () {
  129                var drRe sults = fa lse;
  130                beforeEa ch(functio n (done) {
  131                    if ( !drResults ) {
  132                         setTimeout (function  () {
  133                             var d  = new Date ();
  134                             var no w = new Da te();
  135                             d.setM onth(d.get Month() -  3);
  136                             //$('# viewDataOp tions labe l:nth-chil d(2) input ').trigger ('click');
  137                             $('#st artDate'). val(moment (d).format ("M/D/YYYY "));
  138                             $('#en dDate').va l(moment(n ow).format ("M/D/YYYY "));
  139                             MHPRO. Data.View. historical Graphs.sta te.dateBtn Enabled =  true;
  140                             MHPRO. Data.View. historical Graphs.sta te.numberB tnEnabled  = false;
  141                             $("#DR Btn").prop ("disabled ", false). trigger('c lick');
  142                             drResu lts = true ;
  143                             done() ;
  144                         }, 500);
  145                    }
  146                    else  {
  147                         done();
  148                    }
  149                });
  150   //             it('BA MR should  contain mo re than 1  result', f unction ()  {
  151   //                 ex pect(MHPRO .Data.View .historica lGraphsCha rt.BAMR.da ta.length  > 0).toBeT ruthy();
  152   //             });
  153                it('GAD7  should co ntain more  than 1 re sult', fun ction () {
  154                    expe ct(MHPRO.D ata.View.h istoricalG raphsChart .GAD7.data .length >  0).toBeTru thy();
  155                });
  156                it('PHQ9  should co ntain more  than 1 re sult', fun ction () {
  157                    expe ct(MHPRO.D ata.View.h istoricalG raphsChart .PHQ9.data .length >  0).toBeTru thy();
  158                });
  159                describe ("GAD7 dat e range",  function ( ) {
  160                    var  results =  false;
  161                    befo reEach(fun ction (don e) {
  162                         if (!resul ts) {
  163                             MHPRO. View.histo ricalGraph .filterAss essments() ;
  164                             setTim eout(funct ion () {
  165                                 $( '#GAD7Head er a').tri gger('clic k');
  166                                 re sults = tr ue;
  167                                 do ne();
  168                             }, 250 );
  169                         }
  170                         else {
  171                             done() ;
  172                         }
  173                    });
  174                    it(' Chart shou ld exist',  function  () {
  175                         expect($(' #GAD7Chart ').height( ) > 0 && $ ('#GAD7Cha rt').width () > 0).to BeTruthy() ;
  176                    });
  177                });
  178           }) ;
  179           de scribe("Nu mber of As sessments" , function  () {
  180                var noaR esults = f alse;
  181                beforeEa ch(functio n (done) {
  182                    if ( !noaResult s) {
  183                         setTimeout (function  () {
  184                             $('#vi ewDataOpti ons label: first-chil d input'). trigger('c lick');
  185                             $('#nu mberOfAsse ssments'). val('2');
  186                             MHPRO. Data.View. historical Graphs.sta te.dateBtn Enabled =  false;
  187                             MHPRO. Data.View. historical Graphs.sta te.numberB tnEnabled  = true;
  188                             $('#NO ABtn').pro p("disable d", false) .trigger(' click');
  189                             noaRes ults = tru e;
  190                             done() ;
  191                         }, 250);
  192                    }
  193                    else  {
  194                         done();
  195                    }
  196                });
  197   //             it('BA MR results  to be 2',  function  () {
  198   //                 ex pect(MHPRO .Data.View .historica lGraphsCha rt.BAMR.da ta).toHave Length(2);
  199   //             });
  200                it('GAD7  results t o be 2', f unction ()  {
  201                    expe ct(MHPRO.D ata.View.h istoricalG raphsChart .GAD7.data ).toHaveLe ngth(2);
  202                });
  203                it('PHQ9  results t o be 2', f unction ()  {
  204                    expe ct(MHPRO.D ata.View.h istoricalG raphsChart .PHQ9.data ).toHaveLe ngth(2);
  205                });
  206                describe ("number r ange", fun ction () {
  207                    var  results =  false;
  208                    befo reEach(fun ction (don e) {
  209                         if (!resul ts) {
  210                             MHPRO. View.histo ricalGraph .filterAss essments() ;
  211                             setTim eout(funct ion () {
  212                                 $( '#GAD7Head er a').tri gger('clic k');
  213                                 re sults = tr ue;
  214                                 do ne();
  215                             }, 250 );
  216                         }
  217                         else {
  218                             done() ;
  219                         }
  220                    });
  221                    it(' Chart shou ld exist',  function  () {
  222                         expect($(' #GAD7Chart ').height( ) > 0 && $ ('#GAD7Cha rt').width () > 0).to BeTruthy() ;
  223                    });
  224                });
  225           }) ;
  226           de scribe("GA D7 Number  of Assessm ents", fun ction () {
  227                var resu lts = fals e;
  228                beforeEa ch(functio n (done) {
  229                    if ( !results)  {
  230                         MHPRO.View .historica lGraph.fil terAssessm ents();
  231                         setTimeout (function  () {
  232                             $('#GA D7Header a ').trigger ('click');
  233                             result s = true;
  234                             done() ;
  235                         }, 250);
  236                    }
  237                    else  {
  238                         done();
  239                    }
  240                });
  241                it('GAD- 7 should i nitially s how chart' , function  () {
  242                    expe ct($('#GAD 7Chart').h eight() >  0 && $('#G AD7Chart') .width() >  0).toBeTr uthy();
  243                });
  244                it('GAD- 7 should s how table  on option  click', fu nction ()  {
  245                    $('# GAD7Option s label:nt h-child(2) ').trigger ('click');
  246                    expe ct($('#gad 7-scores') .height()  > 0 && $(' #gad7-scor es').width () > 0).to BeTruthy() ;
  247                });
  248                it('GAD- 7 guide sh own on cli ck', funct ion () {
  249                    $('# GAD7Scores Header a') .trigger(' click');
  250                    expe ct($('#col lapseGAD7  .panel-bod y').height () > 0 &&  $('#collap seGAD7 .pa nel-body') .width() >  0).toBeTr uthy();
  251                });
  252           }) ;
  253           de scribe("PH Q-9 Number  of Assess ments", fu nction ()  {
  254                var resu lts = fals e;
  255                beforeEa ch(functio n (done) {
  256                    if ( !results)  {
  257                         MHPRO.View .historica lGraph.fil terAssessm ents();
  258                         setTimeout (function  () {
  259                             $('#PH Q9Header a ').trigger ('click');
  260                             result s = true;
  261                             done() ;
  262                         }, 250);
  263                    }
  264                    else  {
  265                         done();
  266                    }
  267                });
  268                it('PHQ- 9 should i nitially s how chart' , function  () {
  269                    expe ct($('#PHQ 9Chart').h eight() >  0 && $('#P HQ9Chart') .width() >  0).toBeTr uthy();
  270                });
  271                it('PHQ- 9 should s how table  on option  click', fu nction ()  {
  272                    $('# PHQ9Option s label:nt h-child(2) ').trigger ('click');
  273                    expe ct($('#phq 9-scores') .height()  > 0 && $(' #phq9-scor es').width () > 0).to BeTruthy() ;
  274                });
  275                it('PHQ- 9 guide sh own on cli ck', funct ion () {
  276                    $('# PHQ9Scores Heading a' ).trigger( 'click');
  277                    expe ct($('#col lapsePHQ9  .panel-bod y').height () > 0 &&  $('#collap sePHQ9 .pa nel-body') .width() >  0).toBeTr uthy();
  278                });
  279           }) ;
  280       });
  281  
  282  
  283       //THIS  SHOULD AL WAYS BE LA ST. THIS W ILL KILL T HE SESSION
  284       xdescr ibe("User  times out  or logs ou t of appli cation", f unction ()  {
  285           de scribe("To ken should  be delete d", functi on () {
  286                var toke n = false;
  287                beforeEa ch(functio n (done) {
  288                    App. vent.on('t est-token: deleted',  function ( ) {
  289                         token = tr ue;
  290                         done();
  291                    });
  292                    MHPR O.Model.De leteToken  = new MHPR O.Model.de leteToken( );
  293                    MHPR O.Model.De leteToken. destroy({
  294                         dataType:  "text",
  295                         contentTyp e: false,
  296                         processDat a: false,
  297                         complete:  function ( model, res ponse) {
  298                             App.ve nt.trigger ('test-tok en:deleted ');
  299                         }
  300                    });
  301                });
  302                it('Toke n delete r equest was  successfu l', functi on () {
  303                    expe ct(token). toBe(true) ;
  304                });
  305           }) ;
  306           de scribe("se ssionStora ge token s hould be d eleted", f unction ()  {
  307                var toke n = false;
  308                beforeEa ch(functio n () {
  309                    App_ Utils.Clea rSessionTo ken('token ');
  310                });
  311                it('Toke n is null' , function  () {
  312                    expe ct(App_Uti ls.GetSess ionToken() ).toBe(nul l);
  313                });
  314           }) ;
  315           de scribe("JS ESSIONID c ookie shou ld be dele ted", func tion () {
  316                var cook ie = false ;
  317                beforeEa ch(functio n () {
  318                    App_ Utils.Dele teCookie(' JSESSIONID ');
  319                });
  320                it('Cook ie does no t exist',  function ( ) {
  321                    expe ct(App_Uti ls.CookieE xists('JSE SSIONID')) .toBe(fals e);
  322                });
  323           }) ;
  324       });
  325   });