40. EPMO Open Source Coordination Office Redaction File Detail Report

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

40.1 Files compared

# Location File Last Modified
1 PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\SeleniumTests\src\automationFramework DisapproveClaimsPageTest.java Fri Dec 8 17:52:34 2017 UTC
2 PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\SeleniumTests\src\automationFramework DisapproveClaimsPageTest.java Fri Dec 8 18:32:42 2017 UTC

40.2 Comparison summary

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

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

40.4 Active regular expressions

No regular expressions were active.

40.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package au tomationFr amework;
  5  
  6   import sta tic org.ju nit.Assert .*;
  7  
  8   import jav a.io.File;
  9   import jav a.util.con current.Ti meUnit;
  10  
  11   import org .junit.Aft er;
  12   import org .junit.Aft erClass;
  13   import org .junit.Bef ore;
  14   import org .junit.Bef oreClass;
  15   import org .junit.Tes t;
  16   import org .junit.int ernal.Text Listener;
  17   import org .junit.run ner.JUnitC ore;
  18   import org .junit.run ner.Result ;
  19   import org .openqa.se lenium.Ale rt;
  20   import org .openqa.se lenium.By;
  21   import org .openqa.se lenium.Key s;
  22   import org .openqa.se lenium.NoA lertPresen tException ;
  23   import org .openqa.se lenium.NoS uchElement Exception;
  24   import org .openqa.se lenium.Web Driver;
  25   import org .openqa.se lenium.Web Element;
  26   import org .openqa.se lenium.ie. InternetEx plorerDriv er;
  27   import org .openqa.se lenium.fir efox.Firef oxDriver;
  28   import org .openqa.se lenium.sup port.ui.Ex pectedCond itions;
  29   import org .openqa.se lenium.sup port.ui.Se lect;
  30   import org .openqa.se lenium.sup port.ui.Wa it;
  31   import org .openqa.se lenium.sup port.ui.We bDriverWai t;
  32  
  33   import org .openqa.se lenium.rem ote.Desire dCapabilit ies;
  34  
  35   /**
  36    * @author   DN S      PEREZF
  37    *
  38    */
  39   public cla ss Disappr oveClaimsP ageTest ex tends Fpps CodeLaunch er {
  40           
  41              public voi d test() t hrows Exce ption {
  42                      go ToDisappro veClaimsPa geViaAgedC laimsPageS electingAl lClaims();
  43                      go ToDisappro veClaimsPa geViaSearc hClaimsPag eAndSelect ingOnlyRej ectedClaim s();
  44                      go ToDisappro veClaimsPa geViaSearc hClaimsPag eAndSelect ingOnlyCom pletedClai ms();
  45                      cl ickSetActi veButton() ;
  46                      go ToLoginPag eAndClickL oginButton ();
  47              }
  48  
  49  
  50           /* *
  51            *  @throws j ava.lang.E xception
  52            * /
  53           @B eforeClass
  54           pu blic stati c void set UpBeforeCl ass() thro ws Excepti on {
  55                    Syst em.out.pri ntln("Disa pproveClai msPageTest : Begin se tUpBeforeC lass()");
  56                    Syst em.out.pri ntln("Disa pproveClai msPageTest : End setU pBeforeCla ss()");
  57           }
  58  
  59           /* *
  60            *  @throws j ava.lang.E xception
  61            * /
  62           @A fterClass
  63           pu blic stati c void tea rDownAfter Class() th rows Excep tion {
  64                    Syst em.out.pri ntln("Disa pproveClai msPageTest : Begin te arDownAfte rClass()") ;
  65                    Syst em.out.pri ntln("Disa pproveClai msPageTest : End tear DownAfterC lass()");
  66           }
  67  
  68           /* *
  69            *  @throws j ava.lang.E xception
  70            * /
  71           @B efore
  72           pu blic void  setUp() th rows Excep tion {
  73                    Syst em.out.pri ntln("Disa pproveClai msPageTest : Begin se tUp()");
  74                    
  75                    File  file = ne w File("dr ivers/IEDr iverServer .exe");
  76                    Syst em.setProp erty("webd river.ie.d river", fi le.getAbso lutePath() );
  77                    driv er = new I nternetExp lorerDrive r();
  78                    
  79                    driv er.manage( ).timeouts ().implici tlyWait(30 , TimeUnit .SECONDS);
  80                    Syst em.out.pri ntln("End  Executing  'setUp' me thod");
  81                    
  82  
  83                    goTo LoginPageA ndClickLog inButton() ;
  84                    Thre ad.sleep(2 000);
  85                    
  86                    clic kSetActive Button();
  87                    Thre ad.sleep(2 000);
  88                    
  89                    Syst em.out.pri ntln("Disa pproveClai msPageTest : End setU p()");
  90           }
  91           
  92           //  Assumes t hat there  will be Cl aims in th e Table an d that the re will be  an "error Message".
  93           pr ivate void  goToDisap proveClaim sPageViaAg edClaimsPa geSelectin gAllClaims () throws  Exception  {
  94                    driv er.get(bas eURL + "ag edClaims") ;
  95                    Thre ad.sleep(3 000);
  96                    
  97                    WebE lement pag eTitleElem ent = driv er.findEle ment(By.cl assName("p age-title" ));
  98                    WebE lement pag eTitle_h1_ Element =  pageTitleE lement.fin dElement(B y.tagName( "h1"));
  99                    asse rtEquals(" Aged Claim s Page not  reached!" , "Aged Cl aims", pag eTitle_h1_ Element.ge tText());
  100                    
  101                    // S elected al l the Clai ms in the  Aged Claim s Table.
  102                    WebE lement tab leComponen tElement =  driver.fi ndElement( By.id("tab le"));  
  103                    WebE lement dat aTableElem ent = tabl eComponent Element.fi ndElement( By.id("dat atable"));
  104                    WebE lement sel ectedColum nElement =  dataTable Element.fi ndElement( By.id("sel ect"));
  105                    WebE lement sel ectColumnC heckBoxEle ment = sel ectedColum nElement.f indElement (By.name(" colcheckbo x"));
  106                    sele ctColumnCh eckBoxElem ent.click( );
  107                    Thre ad.sleep(2 000);
  108                    
  109                    // C lick on th e Disappro ve Button  of the Age d Claims P age.
  110                    WebE lement dis approveBut tonElement  = driver. findElemen t(By.id("u pperDisapp roveButton "));
  111                    disa pproveButt onElement. click();
  112                    Thre ad.sleep(2 000);
  113                    
  114                    // T est to see  that it i s the Disa pprove Cla ims Page t hat has be en reached .
  115                    page TitleEleme nt = drive r.findElem ent(By.cla ssName("pa ge-title") );
  116                    page Title_h1_E lement = p ageTitleEl ement.find Element(By .tagName(" h1"));
  117                    asse rtEquals(" Disapprove  Claims Pa ge not rea ched! Inco rrect Titl e!", "Disa pprove Cla ims", page Title_h1_E lement.get Text());
  118                    Obje ct disappr oveClaimsP ageUrl = " disapprove ";
  119                    asse rtEquals(" Inorrect U RL reached  for Disap prove Clai ms Page!",  disapprov eClaimsPag eUrl, driv er.getCurr entUrl());
  120                    
  121                    Thre ad.sleep(2 000);
  122           }
  123           
  124           pr ivate void  goToDisap proveClaim sPageViaSe archClaims PageAndSel ectingOnly RejectedCl aims() thr ows Except ion {
  125                    driv er.get(bas eURL + "se arch");
  126                    Thre ad.sleep(3 000);
  127                    
  128                    // V erify it's  the Searc h Claims P age.
  129                    WebE lement pag eTitleElem ent = driv er.findEle ment(By.cl assName("p age-title" ));
  130                    WebE lement pag eTitle_h1_ Element =  pageTitleE lement.fin dElement(B y.tagName( "h1"));
  131                    asse rtEquals(" Search Cla ims Page n ot reached !", "Claim s Search",  pageTitle _h1_Elemen t.getText( ));
  132                    
  133                    // S elect the  "All" Clai m Type.
  134                    Sele ct claimTy peSelectBo x = new Se lect(drive r.findElem ent(By.nam e("claimTy pe")));
  135                    clai mTypeSelec tBox.selec tByVisible Text("All" );
  136                    Thre ad.sleep(1 000);
  137                    
  138                    // S elect the  "Rejected"  Claim Sta tus.
  139                    Sele ct claimSt atusSelect Box = new  Select(dri ver.findEl ement(By.n ame("claim Status"))) ;
  140                    clai mStatusSel ectBox.sel ectByVisib leText("Re jected");
  141                    Thre ad.sleep(1 000);
  142                    
  143                    // C lick on th e Search B utton to b ring uo al l the "Rej ected" Cla ims.
  144                    WebE lement sea rchButtonE lement = d river.find Element(By .id("searc h"));
  145                    sear chButtonEl ement.clic k();
  146                    Thre ad.sleep(4 000);
  147                    
  148                    // S elect all  the Reject ed Claims  for Disapp roval.
  149                    WebE lement tab leComponen tElement =  driver.fi ndElement( By.id("tab le"));
  150                    WebE lement dat aTableElem ent = tabl eComponent Element.fi ndElement( By.id("dat atable"));
  151                    WebE lement sel ectedColum nElement =  dataTable Element.fi ndElement( By.id("sel ect"));
  152                    WebE lement col umnCheckBo xElement =  selectedC olumnEleme nt.findEle ment(By.na me("colche ckbox"));
  153                    colu mnCheckBox Element.cl ick();
  154                    Thre ad.sleep(2 000);     
  155                    
  156                    // C lick on th e Disappro ve Button.
  157                    WebE lement dis approveBut tonElement  = driver. findElemen t(By.id("u pperDisapp rove"));
  158                    disa pproveButt onElement. click();
  159                    
  160                    Thre ad.sleep(4 000);
  161           }
  162           
  163           pr ivate void  goToDisap proveClaim sPageViaSe archClaims PageAndSel ectingOnly CompletedC laims() th rows Excep tion {
  164                    driv er.get(bas eURL + "se arch");
  165                    Thre ad.sleep(3 000);
  166                    
  167                    // V erify it's  the Searc h Claims P age.
  168                    WebE lement pag eTitleElem ent = driv er.findEle ment(By.cl assName("p age-title" ));
  169                    WebE lement pag eTitle_h1_ Element =  pageTitleE lement.fin dElement(B y.tagName( "h1"));
  170                    asse rtEquals(" Search Cla ims Page n ot reached !", "Claim s Search",  pageTitle _h1_Elemen t.getText( ));
  171                    
  172                    // S elect the  "All" Clai m Type.
  173                    Sele ct claimTy peSelectBo x = new Se lect(drive r.findElem ent(By.nam e("claimTy pe")));
  174                    clai mTypeSelec tBox.selec tByVisible Text("All" );
  175                    Thre ad.sleep(1 000);
  176                    
  177                    // S elect the  "Complete"  Claim Sta tus.
  178                    Sele ct claimSt atusSelect Box = new  Select(dri ver.findEl ement(By.n ame("claim Status"))) ;
  179                    clai mStatusSel ectBox.sel ectByVisib leText("Co mplete");
  180                    Thre ad.sleep(1 000);
  181                    
  182                    // C lick on th e Search B utton to b ring uo al l the "Rej ected" Cla ims.
  183                    WebE lement sea rchButtonE lement = d river.find Element(By .id("searc h"));
  184                    sear chButtonEl ement.clic k();
  185                    Thre ad.sleep(4 000);
  186                    
  187                    // S elect all  the Reject ed Claims  for Disapp roval.
  188                    WebE lement tab leComponen tElement =  driver.fi ndElement( By.id("tab le"));
  189                    WebE lement dat aTableElem ent = tabl eComponent Element.fi ndElement( By.id("dat atable"));
  190                    WebE lement sel ectedColum nElement =  dataTable Element.fi ndElement( By.id("sel ect"));
  191                    WebE lement col umnCheckBo xElement =  selectedC olumnEleme nt.findEle ment(By.na me("colche ckbox"));
  192                    colu mnCheckBox Element.cl ick();
  193                    Thre ad.sleep(2 000);     
  194                    
  195                    // C lick on th e Disappro ve Button.
  196                    WebE lement dis approveBut tonElement  = driver. findElemen t(By.id("u pperDisapp rove"));
  197                    disa pproveButt onElement. click();
  198                    
  199                    Thre ad.sleep(4 000);              
  200           }
  201           
  202           pr ivate void  clickSetA ctiveButto n() throws  Exception  {
  203                    WebE lement set ActiveButt on = drive r.findElem ent(By.id( "setActive "));
  204                    asse rtNotNull( setActiveB utton);
  205                    setA ctiveButto n.click();
  206                    // s etActiveBu tton.submi t(); // No t inside o f a "form"  element.
  207                    setA ctiveButto n.sendKeys (Keys.ENTE R);
  208           }
  209  
  210           pr ivate void  goToLogin PageAndCli ckLoginBut ton() thro ws Excepti on {
  211                    driv er.get(bas eURL);
  212                    WebE lement log inButton =  driver.fi ndElement( By.id("log inBtn"));
  213                    asse rtNotNull( loginButto n);
  214                    
  215                    // C lick the L ogin Butto n. Had to  do this as  advised b y Joshua L one
  216                    // t o get this  to work t o forward  to next pa ge.
  217                    logi nButton.cl ick();
  218                    logi nButton.su bmit();
  219                    logi nButton.se ndKeys(Key s.ENTER);
  220           }
  221  
  222           /* *
  223            *  @throws j ava.lang.E xception
  224            * /
  225           @A fter
  226           pu blic void  tearDown()  throws Ex ception {
  227                    Syst em.out.pri ntln("Disa pproveClai msPageTest : Begin te arDown()") ;
  228                    
  229                    Thre ad.sleep(5 000);
  230                    driv er.close() ;
  231                    driv er.quit();
  232                    
  233                    Syst em.out.pri ntln("Disa pproveClai msPageTest : End tear Down()");
  234           }
  235  
  236           @T est
  237           pu blic void  test_1_can celButton( ) throws E xception {
  238                    Syst em.out.pri ntln("Disa pproveClai msPageTest : Begin te st_1_cance lButton()" );
  239                    
  240                    goTo Disapprove ClaimsPage ViaAgedCla imsPageSel ectingAllC laims();
  241                    
  242                    WebE lement can celButton  = driver.f indElement (By.id("ca ncelButton "));
  243                    
  244                    canc elButton.c lick();
  245                    Thre ad.sleep(3 000);
  246                    
  247                    // H ad to comm ent out th e below du e to getti ng a State ElementRef erenceExce ption 
  248                    //    stating t hat the El ement is n o longer v alid.
  249                    // c ancelButto n.submit() ;
  250                    // c ancelButto n.sendKeys (Keys.ENTE R);
  251                    
  252                    WebE lement pag eTitleElem ent = driv er.findEle ment(By.id ("pageTitl e"));
  253                    asse rtNotNull( pageTitleE lement);
  254                    
  255                    asse rtEquals(" Incorrect  Page Title  for page  forwarded  after clic king 'Canc el' button !", 
  256                             "Claim s", pageTi tleElement .getText() );
  257                    
  258                    asse rtEquals(" Inorrect U RL reached  for Claim s Home Pag e!", "http ://localho st:4200/cl aimsHomePa ge", drive r.getCurre ntUrl());
  259                    
  260                    Syst em.out.pri ntln("Disa pproveClai msPageTest : End test _1_cancelB utton()");
  261           }
  262           
  263           @T est
  264           pu blic void  test_2_fai lureMessag eWhenClaim sInTable()  throws Ex ception {
  265                    Syst em.out.pri ntln("Disa pproveClai msPageTest : Begin te st_2_failu reMessageW henClaimsI nTable()") ;
  266                    
  267                    goTo Disapprove ClaimsPage ViaAgedCla imsPageSel ectingAllC laims();
  268                    
  269                    // E xception t hrown if n ot present .
  270                    WebE lement ale rtErrorMes sageElemen t = driver .findEleme nt(By.id(" errorMessa geWhenClai msPresentI nTable"));
  271                    
  272                    Stri ng partOfE xpectedErr orMessage_ 1 = "The f ollowing c laims cann ot be disa pproved be cause they  are ";
  273                    asse rtTrue("Ex pected Fir st part of  Failure M essage not  present!" , alertErr orMessageE lement.get Text().con tains(part OfExpected ErrorMessa ge_1));
  274                    
  275                    Stri ng partOfE xpectedErr orMessage_ 2 = "compl eted, part ially reco nciled, or  rejected:  ";
  276                    asse rtTrue("Ex pected Sec ond part o f Failure  Message no t present! ", alertEr rorMessage Element.ge tText().co ntains(par tOfExpecte dErrorMess age_2));
  277                    
  278                    Syst em.out.pri ntln("Disa pproveClai msPageTest : End test _2_failure MessageWhe nClaimsInT able()");
  279           }
  280           
  281           @T est
  282           pu blic void  test_3_fai lureMessag eWhenClaim sAllReject ed() throw s Exceptio n {
  283                    Syst em.out.pri ntln("Disa pproveClai msPageTest : Begin te st_3_failu reMessageW henClaimsA llRejected ()");
  284                    
  285                    goTo Disapprove ClaimsPage ViaSearchC laimsPageA ndSelectin gOnlyRejec tedClaims( );
  286                    
  287                    // E xception t hrown if n ot present .
  288                    WebE lement ale rtErrorMes sageElemen t = driver .findEleme nt(By.id(" errorMessa geWhenNoCl aimsPresen tInTable") );
  289                    
  290                    Stri ng partOfE xpectedErr orMessage_ 1 = "The f ollowing c laims cann ot be disa pproved be cause they  are ";
  291                    asse rtTrue("Ex pected Fir st part of  Failure M essage not  present!" , alertErr orMessageE lement.get Text().con tains(part OfExpected ErrorMessa ge_1));
  292                    
  293                    Stri ng partOfE xpectedErr orMessage_ 2 = "compl eted, part ially reco nciled, or  rejected:  ";
  294                    asse rtTrue("Ex pected Sec ond part o f Failure  Message no t present! ", alertEr rorMessage Element.ge tText().co ntains(par tOfExpecte dErrorMess age_2));
  295                    
  296                    Syst em.out.pri ntln("Disa pproveClai msPageTest : End test _3_failure MessageWhe nClaimsAll Rejected() ");
  297           }
  298           
  299           @T est
  300           pu blic void  test_4_fai lureMessag eWhenClaim sAllComple ted() thro ws Excepti on {
  301                    Syst em.out.pri ntln("Disa pproveClai msPageTest : Begin te st_4_failu reMessageW henClaimsA llComplete d()");
  302                    
  303                    goTo Disapprove ClaimsPage ViaSearchC laimsPageA ndSelectin gOnlyCompl etedClaims ();
  304                    
  305                    // E xception t hrown if n ot present .
  306                    WebE lement ale rtErrorMes sageElemen t = driver .findEleme nt(By.id(" errorMessa geWhenNoCl aimsPresen tInTable") );
  307                    
  308                    Stri ng partOfE xpectedErr orMessage_ 1 = "The f ollowing c laims cann ot be disa pproved be cause they  are ";
  309                    asse rtTrue("Ex pected Fir st part of  Failure M essage not  present!" , alertErr orMessageE lement.get Text().con tains(part OfExpected ErrorMessa ge_1));
  310                    
  311                    Stri ng partOfE xpectedErr orMessage_ 2 = "compl eted, part ially reco nciled, or  rejected:  ";
  312                    asse rtTrue("Ex pected Sec ond part o f Failure  Message no t present! ", alertEr rorMessage Element.ge tText().co ntains(par tOfExpecte dErrorMess age_2));
  313                    
  314                    Syst em.out.pri ntln("Disa pproveClai msPageTest : End test _4_failure MessageWhe nClaimsAll Completed( )");
  315           }
  316  
  317   }