51. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/25/2018 3:41:11 PM 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.

51.1 Files compared

# Location File Last Modified
1 Pain_Coach_v3.0_Jun_2018.zip\vpc-staff-web.zip\vpc-staff-web\app\common\js\test provider-authenticated.js Thu May 10 15:41:27 2018 UTC
2 Pain_Coach_v3.0_Jun_2018.zip\vpc-staff-web.zip\vpc-staff-web\app\common\js\test provider-authenticated.js Wed Jul 25 14:25:21 2018 UTC

51.2 Comparison summary

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

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

51.4 Active regular expressions

No regular expressions were active.

51.5 Comparison detail

  1   App_Resour ces.hostna me = "http :// URL /";
  2   (function  () {
  3       var re ady = 0;
  4       var re adyCheck =  function  () {
  5           if  (ready == = 3) { //  set to 2
  6                App.vent .trigger(' test_resou rces:loade d');
  7           }
  8       };
  9       var su ccessMustS tart = fun ction () {
  10           VP C.Resource s.App = ne w App_Reso urces.Coll ection.App Resources( );
  11           VP C.Resource s.App.fetc h({ succes s: success Handler }) ;
  12           VP C.Resource s.Pgd = ne w App_Reso urces.Coll ection.Pgd Resources( );
  13           VP C.Resource s.Pgd.fetc h({ succes s: success Handler }) ;
  14           VP C.Resource s.PgdModel  = new App _Resources .Collectio n.PgdModel Resources( );
  15           VP C.Resource s.PgdModel .fetch({ s uccess: su ccessHandl er });
  16       };
  17       var su ccessHandl er = funct ion (colle ction, res ponse, opt ions) {
  18           re ady++;
  19           re adyCheck() ;
  20       };
  21       succes sMustStart ();
  22   })();
  23  
  24   describe(" Authentica ted test;" , function () {
  25       var ro uter;
  26       var re sourcesLoa ded = fals e;
  27  
  28       before Each(funct ion (done)  {
  29           if  (resource sLoaded) {  done(); }
  30           Ap p.vent.on( 'test_reso urces:load ed', funct ion () {
  31                resource sLoaded =  true;
  32                // since  we do not  have auth entication  in yet, j ust set us er variabl es for now :
  33                VPC.Data .View.Head er = {mhpu ser: ''};
  34                VPC.Data .View.Head er.mhpuser  = {userId entifier:  {
  35                    assi gningAutho rity: 'EDI PI',
  36                    uniq ueId: '543 21'
  37                }};
  38                done();
  39           }) ;
  40       });
  41  
  42       descri be('Initia lize', fun ction() {
  43          it( 'Checking  resource d irectory l inks', fun ction() {
  44               VPC.Resou rces.App =  new App_R esources.C ollection. AppResourc es(VPC_Dat a.resource s.resource s);
  45               expect(VP C.Resource s.App).toB eDefined() ;
  46               expect(VP C_Data.res ources.res ources).to BeDefined( );
  47          });
  48       });
  49  
  50       descri be("Resour ces", func tion () {
  51           ja smine.DEFA ULT_TIMEOU T_INTERVAL  = 200000;
  52           it ('Resource s Should b e loaded.' , function  () {
  53                expect(r esourcesLo aded).toBe (true);
  54           }) ;
  55       });
  56  
  57       descri be("Router ", functio n() {
  58  
  59           be foreEach(f unction()  {
  60                VPC.rout er = new V PC.Router( );
  61                this.rou teSpy = si non.spy();
  62                try {
  63                    Back bone.histo ry.start({ silent: tr ue, pushSt ate: true} );
  64                } catch( e) { }
  65           }) ;
  66           it ("router s hould be d efined", f unction()  {
  67                expect(V PC.router) .toBeDefin ed();
  68           }) ;
  69  
  70           it ("fires ro ute with ' #home' in  the url",  function()  {
  71                VPC.rout er.bind('r oute:home' , this.rou teSpy);
  72                VPC.rout er.navigat e('home',  true);
  73                expect(t his.routeS py).toHave BeenCalled Once();
  74           }) ;
  75       });
  76  
  77       descri be('Help M odal', fun ction() {
  78           be foreEach(f unction(do ne) {
  79                VPC.Layo ut.header. show(VPC.V iew.Header  = new VPC .View.head er());
  80                $('#help -modal').m odal('show ');
  81                setTimeo ut(done(),  100);
  82                setFixtu res(VPC.La yout.heade r.$el);
  83           }) ;
  84  
  85           it ('help mod al loaded' , function () {
  86                expect($ ('#help-mo dal')).toB eInDOM();
  87           }) ;
  88           it ('Validate  feedback  url is dis played', f unction()  {
  89                  expect($(' #help-feed back a')[0 ].innerHTM L).toEqual ('https:// ur l
/app/pain- coach');
  90           }) ;
  91  
  92           af terEach(fu nction ()  {
  93                $('#help -modal').m odal('hide ');
  94           }) ;
  95       });
  96  
  97       descri be("Progre ss Reports ", functio n() {
  98           VP C.Data.sea rch_patien t.edipi =  "866678030 7";   // p coach, pat ientsevent een
  99  
  100           af terEach(fu nction() {
  101                VPC.Layo ut.content .empty();
  102           }) ;
  103  
  104           xd escribe("C ompleted M onthly Che ck-Ins", f unction()  {
  105  
  106                beforeEa ch(functio n (done) {
  107                    jasm ine.DEFAUL T_TIMEOUT_ INTERVAL =  3500000;
  108                    App. vent.on("a ssessments :loaded",  function()  {
  109                         setTimeout (function  () {
  110                             done() ;
  111                         }, 250);
  112                    });
  113  
  114                    VPC. router.nav igate('rep ortMonthly CheckIn',  {
  115                         trigger: t rue, repla ce: true
  116                    });
  117                });
  118  
  119                it('Conf irm Header  text', fu nction() {
  120                    expe ct($('#con tent-title ').html()) .toEqual(' <span>Comp leted Mont hly <br>Ch eck-In Det ail</span> ');
  121                    expe ct($('.tit le-back-bt n')).toBeI nDOM();
  122                });
  123  
  124                afterEac h(function  () {
  125                    App. vent.off(" assessment s:loaded") ;
  126                    VPC. Layout.con tent.empty ();
  127                });
  128           }) ;
  129  
  130           de scribe('Mo nthly Chec k-In Graph ', functio n () {
  131                xdescrib e('Monthly  Check-In  Graph', fu nction ()  {
  132                    befo reEach(fun ction (don e) {
  133                         var ready  = 0;
  134                         var readyC heck = fun ction () {
  135                             ready+ +;
  136                             if (re ady === 2)  { // set  to 2
  137                                 se tTimeout(f unction ()  {
  138                                      done();
  139                                 },  250);
  140                             }
  141                         };
  142  
  143                         App.vent.o n("assessm entGraph:r endered",  readyCheck ());
  144                         App.vent.o n("monthly CheckInGra ph:rendere d", readyC heck());
  145  
  146                         VPC.Layout .content.s how(new VP C.View.ass essmentsGr aphReports ({action:  'graph'})) ;
  147                         setFixture s(VPC.Layo ut.content .$el);
  148                    });
  149  
  150                    it(' Confirm He aders text ', functio n () {
  151                         //expect($ ('#content -title').h tml()).toE qual('Mont hly Check- In Graph') ;
  152                         //expect($ ('#content ')).toBeIn DOM();
  153                         expect($(' #content') .find('h2' ).find('sp an').html( )).toEqual ('Monthly  <br>Check- In Graph') ;
  154                         expect($(' #overall-s tatus-pane l').find(' .panel-hea ding').fin d('strong' ).html()). toEqual('O verall Sta tus');
  155                    });
  156                    it(' Back butto n present' , function  () {
  157                         expect($(' .title-bac k-btn')).t oBeInDOM() ;
  158                    });
  159                });
  160                describe ("Monthly  Check-in T abular", f unction()  {
  161                    var  myCollecti on = new B ackbone.Co llection() ;
  162                    var  d = new Da te();
  163                    // p opulate 30  rows into  the colle ction
  164                    for  (var idx =  0; idx <  12; idx++)  {
  165                         var painDi aryRow = n ew VPC.Mod el.PainDia ry();
  166                         painDiaryR ow.set("da teCreated" , d.toISOS tring());
  167                         painDiaryR ow.set("re portDate",  d.toISOSt ring());
  168                         painDiaryR ow.set("sc ore", idx  % 10);
  169                         painDiaryR ow.set("ma xScore", 1 0);
  170                         myCollecti on.push(pa inDiaryRow );
  171                         // decreme nt date
  172                         d.setDate( d.getDate( ) - 1);
  173                    }
  174  
  175                    befo reEach(fun ction(done ) {
  176                         VPC.Layout .content.s how(new Ma rionette.I temView({
  177                             templa te: VPC.Te mplate.pai nDiaryGrap hDetailsTa b,
  178                             collec tion: myCo llection
  179                         }));
  180                         setTimeout (function  () {
  181                             setFix tures(VPC. Layout.con tent.$el);
  182                             done() ;
  183                         }, 250);
  184                    });
  185  
  186                    it(' Verify Gra ph Data bu tton exist s', functi on() {
  187                         expect($(' .graphical View')).to BeInDOM();
  188                    });
  189                    it(' Count 30 s cores', fu nction() {
  190                         expect($(' #table-tab let-view t able td'). length).to Equal(12);
  191                    });
  192                    it(' VPC-3512 -  view grap h data but ton', func tion() {
  193                         expect($(' .graph-vie w')[0].inn erHTML).to Equal('Vie w Graph Da ta');
  194                    });
  195                });
  196  
  197                xdescrib e("Complet ed Monthly  Check-Ins  Report",  function ( ) {
  198  
  199                    befo reEach(fun ction (don e) {
  200                         jasmine.DE FAULT_TIME OUT_INTERV AL = 35000 00;
  201                         App.vent.o n("assessm ents:loade d", functi on () {
  202                             setTim eout(funct ion () {
  203                                 do ne();
  204                             }, 250 );
  205                         });
  206  
  207                         VPC.router .navigate( 'assessmen ts', {
  208                             trigge r: true, r eplace: tr ue
  209                         });
  210                    });
  211  
  212                    it(' Confirm He ader text' , function  () {
  213                         expect($(' .title-bac k-btn')).t oBeInDOM() ;
  214                    });
  215                });
  216  
  217                describe ("Complete d Monthly  Check-In D etails pag e", functi on() {
  218                    befo reEach(fun ction() {
  219                         var myResp onse = new  VPC.Model .MonthlyAs sessment({
  220                             painIn tensity: 1 ,
  221                             painIn tensityMax : 10,
  222                             painIn terference General: 2 ,
  223                             painIn terference GeneralMax : 10,
  224                             painIn terference Life: 3,
  225                             painIn terference LifeMax: 1 0,
  226                             sleepQ uality: 4,
  227                             sleepQ ualityMax:  10,
  228                             pleasu reLevel: 2 ,
  229                             pleasu reLevelMax : 3,
  230                             depres sion: 2,
  231                             depres sionMax: 3 ,
  232                             overal lStatus: 3 ,
  233                             overal lStatusMax : 6
  234                         });
  235                         VPC.Layout .content.s how(new VP C.View.ass essmentsDe tails({
  236                             model:  myRespons e
  237                         }));
  238                         setFixture s(VPC.Layo ut.content .$el);
  239                    });
  240  
  241                    it(' VPC-3533 -  Verify sc ore remove d from lab els', func tion() {
  242                         var scoreL abels = $( 'th[class= "score"]') ;
  243  
  244                         jQuery.eac h(scoreLab els, funct ion(index,  item) {
  245                             expect (item.inne rText).not .toContain ('Score');
  246                         });
  247                    });
  248                });
  249           }) ;
  250  
  251           xd escribe("C ompleted P ain Diary  Entries",  function()  {
  252  
  253                beforeEa ch(functio n (done) {
  254                    jasm ine.DEFAUL T_TIMEOUT_ INTERVAL =  3500000;
  255                    var  ready = 0;
  256                    var  readyCheck  = functio n () {
  257                         ready++;
  258                         if (ready  === 2) { / / set to 2
  259                             setTim eout(funct ion () {
  260                                 do ne();
  261                             }, 250 );
  262                         }
  263                    };
  264  
  265                    App. vent.on("p ainDiaryEn tries:load ed", ready Check());
  266                    App. vent.on("p ainDiaryEn tries:rend ered", rea dyCheck()) ;
  267  
  268                    VPC. router.nav igate('rep ortDailyPa inDiary',  {
  269                         trigger: t rue, repla ce: true
  270                    });
  271                });
  272  
  273                it('Conf irm Header  text', fu nction() {
  274                    expe ct($('#con tent-title ').html()) .toEqual(' <span>Comp leted Pain  <br>Diary  Entries</ span>');
  275                    expe ct($('.tit le-back-bt n')).toBeI nDOM();
  276                });
  277  
  278                afterEac h(function () {
  279                    App. vent.off(' painDiaryE ntries:loa ded');
  280                    App. vent.off(' painDiaryE ntries:ren dered');
  281                });
  282           }) ;
  283  
  284           xd escribe("P ain Diary  Graph", fu nction() {
  285  
  286                beforeEa ch(functio n (done) {
  287                    jasm ine.DEFAUL T_TIMEOUT_ INTERVAL =  3500000;
  288                    App. vent.on("p ainDiaryGr aph:show",  function( ) {
  289                         setTimeout (function  () {
  290                             done() ;
  291                         }, 250);
  292                    });
  293  
  294                    VPC. router.nav igate('pai n-diary-gr aph', {
  295                         trigger: t rue, repla ce: true
  296                    });
  297                });
  298  
  299                it('Conf irm Header  text', fu nction() {
  300                    expe ct($('#con tent-title ').html()) .toEqual(' Pain Diary  Graph');
  301                    expe ct($('.tit le-back-bt n')).toBeI nDOM();
  302                });
  303           }) ;
  304  
  305           de scribe("Pa in Diary G raph - gra ph by date ", functio n() {
  306                beforeEa ch(functio n() {
  307                    var  currentMod el = new V PC.Model.P ainDiary() ;
  308                    var  num = 1.2;
  309                    curr entModel.s et("painRa ting", num .toFixed(1 ));
  310                    curr entModel.s et("moveme ntImpact",  num.toFix ed(1));
  311                    curr entModel.s et("activi tyInterfer ence", num .toFixed(1 ));
  312                    curr entModel.s et("moodEf fect", num .toFixed(1 ));
  313                    curr entModel.s et("depres sionLevel" , num.toFi xed(1));
  314                    curr entModel.s et("sleepO utcome", n um.toFixed (1));
  315  
  316                    VPC. Layout.con tent.show( new Marion ette.ItemV iew({
  317                         model: cur rentModel,
  318                         template:  VPC.Templa te.painDia ryGraphRow
  319                    }));
  320                    setF ixtures(VP C.Layout.c ontent.$el );
  321                });
  322  
  323                it('Move ment Inter face icon' , function () {
  324                    expe ct($('#ico n-progress -movement- impact-pro v')).toBeI nDOM();
  325                });
  326  
  327                it('Veri fy instruc tions', fu nction() {
  328                    expe ct($('p')[ 0].innerHT ML).toEqua l('Select  a category  to see a  graph of t he daily d iary entri es.');
  329                });
  330           }  );
  331  
  332           de scribe("Pa in Diary G raph Repor t Details  - Tabular  View", fun ction() {
  333                var myCo llection =  new Backb one.Collec tion();
  334                var pain DiaryRow =  new VPC.M odel.PainD iary();
  335                painDiar yRow.set(" dateCreate d", new Da te());
  336                painDiar yRow.set(" reportDate ", new Dat e());
  337                painDiar yRow.set(" score", 5) ;
  338                painDiar yRow.set(" maxScore",  10);
  339                myCollec tion.push( painDiaryR ow);
  340  
  341                beforeEa ch(functio n() {
  342                    VPC. Layout.con tent.show( new Marion ette.ItemV iew({
  343                         template:  VPC.Templa te.painDia ryGraphDet ailsTab,
  344                         collection : myCollec tion
  345                    }));
  346  
  347                    setF ixtures(VP C.Layout.c ontent.$el );
  348                });
  349  
  350                it('Veri fy Graph D ata button  exists',  function()  {
  351                    expe ct($('.gra phicalView ')).toBeIn DOM();
  352                });
  353           }) ;
  354  
  355       });
  356  
  357       });