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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\Testing\src\testing | OkDisapprovalTest.java | Fri Dec 8 17:53:06 2017 UTC |
| 2 | PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\Testing\src\testing | OkDisapprovalTest.java | Fri Dec 8 18:35:07 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 292 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 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 | ||
| 29 | /** | |
| 30 | * @author DN S PEREZF | |
| 31 | * | |
| 32 | */ | |
| 33 | @FixMethod Order(Meth odSorters. NAME_ASCEN DING) | |
| 34 | public cla ss OkDisap provalTest { | |
| 35 | pr ivate WebD river driv er; | |
| 36 | pr ivate Stri ng baseUrl ; | |
| 37 | pr ivate Stri ng rejectC laimsPageU rl; | |
| 38 | ||
| 39 | pu blic stati c void mai n(String a rgs[]) { | |
| 40 | JUni tCore juni t = new JU nitCore(); | |
| 41 | juni t.addListe ner(new Te xtListener (System.ou t)); | |
| 42 | Resu lt result = junit.ru n(OkDisapp rovalTest. class); // Replace " SampleTest " with the name of y our class | |
| 43 | if ( result.get FailureCou nt() > 0) { | |
| 44 | System.out .println(" Test faile d.\n" + re sult); | |
| 45 | System.exi t(1); | |
| 46 | } el se { | |
| 47 | System.out .println(" Test finis hed succes sfully."); | |
| 48 | System.exi t(0); | |
| 49 | } | |
| 50 | } | |
| 51 | ||
| 52 | /* * | |
| 53 | * @throws j ava.lang.E xception | |
| 54 | * / | |
| 55 | @B eforeClass | |
| 56 | pu blic stati c void set UpBeforeCl ass() thro ws Excepti on { | |
| 57 | Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin setUpB eforeClass ()"); | |
| 58 | Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d setUpBef oreClass() "); | |
| 59 | } | |
| 60 | ||
| 61 | /* * | |
| 62 | * @throws j ava.lang.E xception | |
| 63 | * / | |
| 64 | @A fterClass | |
| 65 | pu blic stati c void tea rDownAfter Class() th rows Excep tion { | |
| 66 | Syst em.out.pri ntln("ARej ectClaimsP ageTest: B egin tearD ownAfterCl ass()"); | |
| 67 | Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d tearDown AfterClass ()"); | |
| 68 | } | |
| 69 | ||
| 70 | /* * | |
| 71 | * @throws j ava.lang.E xception | |
| 72 | * / | |
| 73 | @B efore | |
| 74 | pu blic void setUp() th rows Excep tion { | |
| 75 | Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin setUp( )"); | |
| 76 | ||
| 77 | File file = ne w File("dr ivers/IEDr iverServer .exe"); | |
| 78 | Syst em.setProp erty("webd river.ie.d river", fi le.getAbso lutePath() ); | |
| 79 | driv er = new I nternetExp lorerDrive r(); | |
| 80 | ||
| 81 | base Url = "htt p://localh ost:4200"; | |
| 82 | driv er.manage( ).timeouts ().implici tlyWait(30 , TimeUnit .SECONDS); | |
| 83 | ||
| 84 | goTo LoginPageA ndClickLog inButton() ; | |
| 85 | Thre ad.sleep(5 000); | |
| 86 | clic kSetActive Button(); | |
| 87 | ||
| 88 | reje ctClaimsPa geUrl = ba seUrl + "/ reject"; | |
| 89 | ||
| 90 | Thre ad.sleep(3 000); | |
| 91 | ||
| 92 | Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d setUp()" ); | |
| 93 | } | |
| 94 | ||
| 95 | pr ivate void clickSetA ctiveButto n() throws Exception { | |
| 96 | WebE lement set ActiveButt on = drive r.findElem ent(By.id( "setActive ")); | |
| 97 | asse rtNotNull( setActiveB utton); | |
| 98 | setA ctiveButto n.click(); | |
| 99 | // s etActiveBu tton.submi t(); // No t inside o f a "form" element. | |
| 100 | setA ctiveButto n.sendKeys (Keys.ENTE R); | |
| 101 | } | |
| 102 | ||
| 103 | pr ivate void goToLogin PageAndCli ckLoginBut ton() thro ws Excepti on { | |
| 104 | driv er.get(bas eUrl); | |
| 105 | WebE lement log inButton = driver.fi ndElement( By.id("log inBtn")); | |
| 106 | asse rtNotNull( loginButto n); | |
| 107 | ||
| 108 | // C lick the L ogin Butto n. Had to do this as advised b y Joshua L one | |
| 109 | // t o get this to work t o forward to next pa ge. | |
| 110 | logi nButton.cl ick(); | |
| 111 | logi nButton.su bmit(); | |
| 112 | logi nButton.se ndKeys(Key s.ENTER); | |
| 113 | } | |
| 114 | ||
| 115 | /* * | |
| 116 | * @throws j ava.lang.E xception | |
| 117 | * / | |
| 118 | @A fter | |
| 119 | pu blic void tearDown() throws Ex ception { | |
| 120 | Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin tearDo wn()"); | |
| 121 | ||
| 122 | Thre ad.sleep(5 000); | |
| 123 | driv er.close() ; | |
| 124 | driv er.quit(); | |
| 125 | Thre ad.sleep(5 000); | |
| 126 | Syst em.out.pri ntln("End Executing 'tearDown' method"); | |
| 127 | ||
| 128 | Syst em.out.pri ntln("Reje ctClaimsPa geTest: En d tearDown ()"); | |
| 129 | } | |
| 130 | ||
| 131 | @T est | |
| 132 | pu blic void test_1_okD isapproval Functional ity() thro ws Excepti on { | |
| 133 | Syst em.out.pri ntln("Reje ctClaimsPa geTest: Be gin test_1 _RejectCla imsPageApp earsWhenGo ingDirectl y()"); | |
| 134 | ||
| 135 | driv er.get(rej ectClaimsP ageUrl); | |
| 136 | Thre ad.sleep(3 000); | |
| 137 | ||
| 138 | WebE lement che ckbox = dr iver.findE lement(By. id("checkB ox0")); | |
| 139 | chec kbox.click (); | |
| 140 | driv er.findEle ment(By.id ("lowerOkD isapproval Button")). click(); | |
| 141 | WebE lement suc cessMsg = driver.fin dElement(B y.id("succ essfulClai msDisappro valMessage ")); | |
| 142 | ||
| 143 | asse rtTrue(suc cessMsg.ge tText().co ntains("Ac cepted dis approval o f Claim(s) :")); | |
| 144 | ||
| 145 | } | |
| 146 | ||
| 147 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.