63. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/8/2017 1:33:41 PM 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.

63.1 Files compared

# Location File Last Modified
1 PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\Testing\src\testing RejectClaimsPagination.java Fri Dec 8 17:53:04 2017 UTC
2 PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\Testing\src\testing RejectClaimsPagination.java Fri Dec 8 18:35:09 2017 UTC

63.2 Comparison summary

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

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

63.4 Active regular expressions

No regular expressions were active.

63.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package te sting;
  5  
  6   import sta tic org.ju nit.Assert .*;
  7  
  8   import jav a.io.File;
  9   import jav a.util.Lis t;
  10   import jav a.util.con current.Ti meUnit;
  11  
  12   import org .junit.Aft er;
  13   import org .junit.Aft erClass;
  14   import org .junit.Bef ore;
  15   import org .junit.Bef oreClass;
  16   import org .junit.Fix MethodOrde r;
  17   import org .junit.run ners.Metho dSorters;
  18   import org .junit.Tes t;
  19   import org .junit.int ernal.Text Listener;
  20   import org .junit.run ner.JUnitC ore;
  21   import org .junit.run ner.Result ;
  22   import org .openqa.se lenium.By;
  23   import org .openqa.se lenium.Key s;
  24   import org .openqa.se lenium.NoS uchElement Exception;
  25   import org .openqa.se lenium.Web Driver;
  26   import org .openqa.se lenium.Web Element;
  27   import org .openqa.se lenium.ie. InternetEx plorerDriv er;
  28   import org .openqa.se lenium.sup port.ui.Se lect;
  29  
  30   /**
  31    * @author  
D NS     MADDIV
  32    *
  33    */
  34   @FixMethod Order(Meth odSorters. NAME_ASCEN DING)
  35   public cla ss RejectC laimsPagin ation {
  36           pr ivate WebD river driv er;
  37           pr ivate Stri ng baseUrl ;
  38           pr ivate Stri ng rejectC laimsPageU rl;
  39           
  40           pu blic stati c void mai n(String a rgs[]) {
  41                    JUni tCore juni t = new JU nitCore();
  42                    juni t.addListe ner(new Te xtListener (System.ou t));
  43                    Resu lt result  = junit.ru n(RejectCl aimsPagina tion.class ); // Repl ace "Sampl eTest" wit h the name  of your c lass
  44                    if ( result.get FailureCou nt() > 0)  {
  45                         System.out .println(" Test faile d.\n" + re sult);
  46                         System.exi t(1);
  47                    } el se {
  48                         System.out .println(" Test finis hed succes sfully.");
  49                         System.exi t(0);
  50                    }
  51           }
  52  
  53           /* *
  54            *  @throws j ava.lang.E xception
  55            * /
  56           @B eforeClass
  57           pu blic stati c void set UpBeforeCl ass() thro ws Excepti on {
  58                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin setUpB eforeClass ()");
  59                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d setUpBef oreClass() ");
  60           }
  61  
  62           /* *
  63            *  @throws j ava.lang.E xception
  64            * /
  65           @A fterClass
  66           pu blic stati c void tea rDownAfter Class() th rows Excep tion {
  67                    Syst em.out.pri ntln("ARej ectClaimsP ageTest: B egin tearD ownAfterCl ass()");
  68                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d tearDown AfterClass ()");
  69           }
  70  
  71           /* *
  72            *  @throws j ava.lang.E xception
  73            * /
  74           @B efore
  75           pu blic void  setUp() th rows Excep tion {
  76                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin setUp( )");
  77                    
  78                    File  file = ne w File("dr ivers/IEDr iverServer .exe");
  79                    Syst em.setProp erty("webd river.ie.d river", fi le.getAbso lutePath() );
  80                    driv er = new I nternetExp lorerDrive r();
  81                    
  82                    base Url = "htt p://localh ost:4200/" ;
  83                    driv er.manage( ).timeouts ().implici tlyWait(30 , TimeUnit .SECONDS);
  84  
  85                    goTo LoginPageA ndClickLog inButton() ;
  86                    Thre ad.sleep(5 000);
  87                    clic kSetActive Button();
  88  
  89                    reje ctClaimsPa geUrl = ba seUrl + "r eject";
  90                    
  91                    Thre ad.sleep(3 000);
  92                    
  93                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d setUp()" );
  94           }
  95           
  96           pr ivate void  clickSetA ctiveButto n() throws  Exception  {
  97                    WebE lement set ActiveButt on = drive r.findElem ent(By.id( "setActive "));
  98                    asse rtNotNull( setActiveB utton);
  99                    setA ctiveButto n.click();
  100                    // s etActiveBu tton.submi t(); // No t inside o f a "form"  element.
  101                    setA ctiveButto n.sendKeys (Keys.ENTE R);
  102           }
  103  
  104           pr ivate void  goToLogin PageAndCli ckLoginBut ton() thro ws Excepti on {
  105                    driv er.get(bas eUrl);
  106                    WebE lement log inButton =  driver.fi ndElement( By.id("log inBtn"));
  107                    asse rtNotNull( loginButto n);
  108                    
  109                    // C lick the L ogin Butto n. Had to  do this as  advised b y Joshua L one
  110                    // t o get this  to work t o forward  to next pa ge.
  111                    logi nButton.cl ick();
  112                    logi nButton.su bmit();
  113                    logi nButton.se ndKeys(Key s.ENTER);
  114           }
  115  
  116           /* *
  117            *  @throws j ava.lang.E xception
  118            * /
  119           @A fter
  120           pu blic void  tearDown()  throws Ex ception {
  121                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin tearDo wn()");
  122                    
  123                    Thre ad.sleep(5 000);
  124                    driv er.close() ;
  125                    driv er.quit();
  126                    Thre ad.sleep(5 000);
  127                    Syst em.out.pri ntln("End  Executing  'tearDown'  method");
  128                    
  129                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d tearDown ()");
  130           }
  131  
  132           @T est
  133           pu blic void  test_1_Rej ectClaimsR esultsForP age() thro ws Excepti on {
  134                    //54 1943
  135                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin test_1 _RejectCla imsResults ForPage()" );
  136                    
  137                    driv er.get(rej ectClaimsP ageUrl);
  138                    Thre ad.sleep(3 000);
  139                    Sele ct dropdow n = new Se lect(drive r.findElem ent(By.id( "page-size ")));
  140                    drop down.selec tByVisible Text("25") ;
  141  
  142                    int  rowCount=d river.find Elements(B y.xpath("/ /table[@id ='datatabl e']/tbody/ tr")).size ();
  143                    Syst em.out.pri ntln("Row  Count "+ r owCount);
  144                    
  145                    asse rtTrue("Wr ong number  of claims  displayed  per page" , rowCount  == 25);
  146  
  147                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d test_1_R ejectClaim sResultsFo rPage()");
  148           }
  149           
  150           
  151           @T est
  152           pu blic void  test_2_Rej ectClaimsP agination( ) throws E xception {
  153                    //54 1946
  154                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin test_2 _RejectCla imsPaginat ion()");
  155  
  156                    driv er.get(rej ectClaimsP ageUrl);
  157                    Thre ad.sleep(3 000);
  158                    WebE lement pag inateButto n = driver .findEleme nt(By.id(" paginateFi rst"));
  159                    asse rtTrue("Pa gination c ontrols ex ist",pagin ateButton! =null);
  160                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d test_2_R ejectClaim sPaginatio n()");
  161           }
  162           
  163           @T est
  164           pu blic void  test_3_Rej ectClaimsN oResults()  throws Ex ception {
  165                    //54 1941
  166                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin test_3 _RejectCla imsNoResul ts()");
  167  
  168                    driv er.get(rej ectClaimsP ageUrl);
  169                    Thre ad.sleep(3 000);
  170                    
  171                    asse rtTrue("Nu mber of re sults exis t", driver .findEleme nt(By.id(" numResults Top")).get Attribute( "innerHTML ").contain s("Number  of Results :"));
  172                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d test_3_R ejectClaim sNoResults ()");
  173           }
  174           
  175           @T est
  176           pu blic void  test_4_Rej ectClaimsS election()  throws Ex ception {
  177                    //54 1940
  178                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin test_4 _RejectCla imsSelecti on()");
  179  
  180                    driv er.get(rej ectClaimsP ageUrl);
  181                    Thre ad.sleep(3 000);
  182                    
  183                    asse rtTrue("Nu mber of re sults exis t", driver .findEleme nt(By.id(" numResults Top")).get Attribute( "innerHTML ").contain s("Number  of Results :"));
  184                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d test_4_R ejectClaim sSelection ()");
  185                    
  186                    WebE lement sel ectAll = d river.find Element(By .name("col checkbox") );
  187                    sele ctAll.clic k();
  188                    
  189                    WebE lement che ckbox0 = d river.find Element(By .id("check Box0"));
  190                    chec kbox0.clic k();
  191                    
  192                    WebE lement che ckbox1 = d river.find Element(By .id("check Box1"));
  193                    chec kbox1.clic k();
  194                    asse rtTrue("Se lect all i s enabled" , selectAl l.isEnable d());
  195                    asse rtTrue("Ch eckbox 0 i s enabled  ", checkbo x0.isEnabl ed());
  196                    asse rtTrue("Ch eckbox 0 i s enabled  ", checkbo x1.isEnabl ed());
  197                             
  198                    
  199           }
  200           
  201           @T est
  202           pu blic void  test_5_Rej ectClaimsS orting() t hrows Exce ption {
  203                    //54 1938
  204                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin test_5 _RejectCla imsSorting ()");
  205  
  206                    driv er.get(rej ectClaimsP ageUrl);
  207                    Thre ad.sleep(3 000);
  208                    WebE lement cla imId = dri ver.findEl ement(By.i d("claimId "));
  209                    WebE lement cla imType = d river.find Element(By .id("claim Type"));
  210                    WebE lement her o = driver .findEleme nt(By.id(" hero"));
  211                    WebE lement pat ientId = d river.find Element(By .id("patie ntId"));
  212                    WebE lement cla imDate = d river.find Element(By .id("claim Date"));
  213                    WebE lement cla imAmount =  driver.fi ndElement( By.id("cla imAmount") );
  214                    WebE lement pro viderName  = driver.f indElement (By.id("pr oviderName "));
  215                    WebE lement dis approvedBy  = driver. findElemen t(By.id("d isapproved By"));
  216                    WebE lement dis approvedDa te = drive r.findElem ent(By.id( "disapprov edDate"));
  217                    WebE lement rea son = driv er.findEle ment(By.id ("reason") );
  218                    WebE lement exp lanation =  driver.fi ndElement( By.id("exp lanation") );
  219                    
  220                    asse rtTrue("So rting cont rols on cl aim ID exi st",(claim Id.isDispl ayed() &&  claimId.is Enabled()) );
  221                    asse rtTrue("So rting cont rols on cl aimType ex ist",(clai mType.isDi splayed()  && claimTy pe.isEnabl ed()));
  222                    asse rtTrue("So rting cont rols on he ro exist", (hero.isDi splayed()  && hero.is Enabled()) );
  223                    asse rtTrue("So rting cont rols on pa tientId ex ist",(pati entId.isDi splayed()  && patient Id.isEnabl ed()));
  224                    asse rtTrue("So rting cont rols on cl aimDate ex ist",(clai mDate.isDi splayed()  && claimDa te.isEnabl ed()));
  225                    asse rtTrue("So rting cont rols on cl aimAmount  exist",(cl aimAmount. isDisplaye d() && cla imAmount.i sEnabled() ));
  226                    asse rtTrue("So rting cont rols on pr oviderName  exist",(p roviderNam e.isDispla yed() && p roviderNam e.isEnable d()));
  227                    asse rtTrue("So rting cont rols on di sapprovedB y exist",( disapprove dBy.isDisp layed() &&  disapprov edBy.isEna bled()));
  228                    asse rtTrue("So rting cont rols on di sapprovedD ate exist" ,(disappro vedDate.is Displayed( ) && disap provedDate .isEnabled ()));
  229                    asse rtTrue("So rting cont rols on re ason exist ",(reason. isDisplaye d() && rea son.isEnab led()));
  230                    asse rtTrue("So rting cont rols on ex planation  exist",(ex planation. isDisplaye d() && exp lanation.i sEnabled() ));
  231  
  232                    Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d test_5_R ejectClaim sSorting() ");
  233           }
  234           
  235   }