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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\src\app\tools\search-user-request | search-user-request.component.spec.ts | Fri Dec 8 17:53:32 2017 UTC |
| 2 | PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\src\app\tools\search-user-request | search-user-request.component.spec.ts | Fri Dec 8 19:12:28 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 432 |
| Changed | 2 | 4 |
| 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 | import { a sync, Comp onentFixtu re, TestBe d } from ' @angular/c ore/testin g'; | |
| 2 | import { M enuCompone nt } from '../../sha red/menu/m enu.compon ent'; | |
| 3 | import { S earchUserR equestComp onent } fr om './sear ch-user-re quest.comp onent'; | |
| 4 | import { R outerTesti ngModule } from '@an gular/rout er/testing '; | |
| 5 | import { H ttpModule } from '@a ngular/htt p'; | |
| 6 | import { F ormsModule } from '@ angular/fo rms'; | |
| 7 | import { D ebugElemen t, SimpleC hanges } f rom '@angu lar/core'; | |
| 8 | import { B y } from ' @angular/p latform-br owser'; | |
| 9 | import { T ableCompon ent } from '../../sh ared/table /table.com ponent'; | |
| 10 | import { P aginationC omponent } from '../ ../shared/ table/pagi nation/pag ination.co mponent'; | |
| 11 | import { N umPerPageC omponent } from '../ ../shared/ table/numP erPage/num PerPage.co mponent'; | |
| 12 | import { A ssignCompo nent } fro m '../../s hared/assi gn/assign. component' ; | |
| 13 | ||
| 14 | ||
| 15 | describe(' SearchUser RequestCom ponent', ( ) => { | |
| 16 | let co mponent: S earchUserR equestComp onent; | |
| 17 | let fi xture: Com ponentFixt ure<Search UserReques tComponent >; | |
| 18 | let de bugElement : DebugEle ment; | |
| 19 | ||
| 20 | before Each(async (() => { | |
| 21 | Te stBed.conf igureTesti ngModule({ | |
| 22 | imports: [FormsMod ule, HttpM odule, Rou terTesting Module], | |
| 23 | declarat ions: [Sea rchUserReq uestCompon ent, MenuC omponent, TableCompo nent, Assi gnComponen t, Paginat ionCompone nt, NumPer PageCompon ent] | |
| 24 | }) | |
| 25 | .compile Components (); | |
| 26 | })); | |
| 27 | ||
| 28 | before Each(() => { | |
| 29 | fi xture = Te stBed.crea teComponen t(SearchUs erRequestC omponent); | |
| 30 | co mponent = fixture.co mponentIns tance; | |
| 31 | fi xture.dete ctChanges( ); | |
| 32 | }); | |
| 33 | ||
| 34 | it('sh ould be cr eated', () => { | |
| 35 | ex pect(compo nent).toBe Truthy(); | |
| 36 | }); | |
| 37 | ||
| 38 | //task #583257 | |
| 39 | it('sh ould have "userName" element', () => { | |
| 40 | co nst debugE lement: De bugElement = fixture .debugElem ent.query( By.css('#u serName')) ; | |
| 41 | co nst htmlEl ement: HTM LElement = debugElem ent.native Element; | |
| 42 | ||
| 43 | ex pect(htmlE lement).to BeTruthy() ; | |
| 44 | ex pect(htmlE lement.hid den).toEqu al(false); | |
| 45 | ex pect(htmlE lement.hid den).toBe( false); | |
| 46 | ||
| 47 | }); | |
| 48 | ||
| 49 | //task #583257 | |
| 50 | it('sh ould set i nput value for userN ame', () = > { | |
| 51 | // first rou nd of chan ge detecti on | |
| 52 | fi xture.dete ctChanges( ); | |
| 53 | ||
| 54 | // get ahold of the in put compo nent.userR equest.dis able_comme nts = "som e text"; | |
| 55 | // let input = debugEle ment.query (By.css('# window_nt_ name')); | |
| 56 | co nst input = fixture. debugEleme nt.query(B y.css('#us erName')); | |
| 57 | co nst inputE lement = i nput.nativ eElement; | |
| 58 | ||
| 59 | // set input value | |
| 60 | in putElement .value = ' vhaispchmi em'; | |
| 61 | in putElement .dispatchE vent(new E vent('inpu t')); | |
| 62 | ||
| 63 | ex pect(compo nent.winnt name.userN ame).toBe( 'vhaispchm iem'); | |
| 64 | }); | |
| 65 | ||
| 66 | //karm a unit tes t task-#58 3318 | |
| 67 | it('sh ould have "firstName " element' , () => { | |
| 68 | co nst debugE lement: De bugElement = fixture .debugElem ent.query( By.css('#f irstName') ); | |
| 69 | co nst htmlEl ement: HTM LElement = debugElem ent.native Element; | |
| 70 | ||
| 71 | ex pect(htmlE lement).to BeTruthy() ; | |
| 72 | ex pect(htmlE lement.hid den).toEqu al(false); | |
| 73 | ex pect(htmlE lement.hid den).toBe( false); | |
| 74 | ||
| 75 | }); | |
| 76 | ||
| 77 | //karm a unit tes t task-#58 3318 | |
| 78 | it('sh ould set i nput value for first Name', () => { | |
| 79 | // first rou nd of chan ge detecti on | |
| 80 | fi xture.dete ctChanges( ); | |
| 81 | ||
| 82 | // get ahold of the in put | |
| 83 | co nst input = fixture. debugEleme nt.query(B y.css('#fi rstName')) ; | |
| 84 | co nst inputE lement = i nput.nativ eElement; | |
| 85 | ||
| 86 | // set input value | |
| 87 | in putElement .value = ' Lucky'; | |
| 88 | in putElement .dispatchE vent(new E vent('inpu t')); | |
| 89 | ||
| 90 | ex pect(compo nent.first Name.first Name).toBe ('Lucky'); | |
| 91 | }); | |
| 92 | ||
| 93 | //karm a test - t ask#588319 | |
| 94 | it('sh ould have "stationId element', () => { | |
| 95 | co nst debugE lement: De bugElement = fixture .debugElem ent.query( By.css('#s tationId') ); | |
| 96 | co nst htmlEl ement: HTM LElement = debugElem ent.native Element; | |
| 97 | ||
| 98 | ex pect(htmlE lement).to BeTruthy() ; | |
| 99 | ex pect(htmlE lement.hid den).toEqu al(false); | |
| 100 | ex pect(htmlE lement.hid den).toBe( false); | |
| 101 | }); | |
| 102 | ||
| 103 | //karm a test - t ask#588319 | |
| 104 | it('sh ould set i nput value for stati onId', () => { | |
| 105 | // first rou nd of chan ge detecti on | |
| 106 | fi xture.dete ctChanges( ); | |
| 107 | ||
| 108 | // get ahold of the in put | |
| 109 | co nst input = fixture. debugEleme nt.query(B y.css('#st ationId')) ; | |
| 110 | co nst inputE lement = i nput.nativ eElement; | |
| 111 | ||
| 112 | // set input value | |
| 113 | in putElement .value = ' 123'; | |
| 114 | in putElement .dispatchE vent(new E vent('inpu t')); | |
| 115 | ||
| 116 | ex pect(compo nent.stati onID.stati onId).toBe ('123'); | |
| 117 | }); | |
| 118 | ||
| 119 | //karm a test - t ask#583320 | |
| 120 | it('sh ould have "lastName" element', () => { | |
| 121 | co nst debugE lement: De bugElement = fixture .debugElem ent.query( By.css('#l astName')) ; | |
| 122 | co nst htmlEl ement: HTM LElement = debugElem ent.native Element; | |
| 123 | ||
| 124 | ex pect(htmlE lement).to BeTruthy() ; | |
| 125 | ex pect(htmlE lement.hid den).toEqu al(false); | |
| 126 | ex pect(htmlE lement.hid den).toBe( false); | |
| 127 | }); | |
| 128 | ||
| 129 | //karm a test - t ask#583320 | |
| 130 | it('sh ould set i nput value for lastN ame', () = > { | |
| 131 | // first rou nd of chan ge detecti on | |
| 132 | fi xture.dete ctChanges( ); | |
| 133 | ||
| 134 | // get ahold of the in put | |
| 135 | co nst input = fixture. debugEleme nt.query(B y.css('#la stName')); | |
| 136 | co nst inputE lement = i nput.nativ eElement; | |
| 137 | ||
| 138 | // set input value | |
| 139 | in putElement .value = ' chan'; | |
| 140 | in putElement .dispatchE vent(new E vent('inpu t')); | |
| 141 | ||
| 142 | ex pect(compo nent.lastN ame.lastNa me).toBe(' chan'); | |
| 143 | }); | |
| 144 | ||
| 145 | //karm a test - t ask#583321 | |
| 146 | it('sh ould have "phone num ber elemen t', () => { | |
| 147 | co nst debugE lement: De bugElement = fixture .debugElem ent.query( By.css('#p hone')); | |
| 148 | co nst htmlEl ement: HTM LElement = debugElem ent.native Element; | |
| 149 | ||
| 150 | ex pect(htmlE lement).to BeTruthy() ; | |
| 151 | ex pect(htmlE lement.hid den).toEqu al(false); | |
| 152 | ex pect(htmlE lement.hid den).toBe( false); | |
| 153 | }); | |
| 154 | ||
| 155 | //karm a test - t ask#583321 | |
| 156 | it('sh ould set i nput value for phone number el ement', () => { | |
| 157 | // first rou nd of chan ge detecti on | |
| 158 | fi xture.dete ctChanges( ); | |
| 159 | ||
| 160 | // get ahold of the in put | |
| 161 | co nst input = fixture. debugEleme nt.query(B y.css('#ph one')); | |
| 162 | co nst inputE lement = i nput.nativ eElement; | |
| 163 | ||
| 164 | // set input value | |
| 165 | in putElement .value = ' 9778654321 '; | |
| 166 | in putElement .dispatchE vent(new E vent('inpu t')); | |
| 167 | ||
| 168 | ex pect(compo nent.phone Number.pho ne).toBe(' 9778654321 '); | |
| 169 | }); | |
| 170 | ||
| 171 | // kar ma test fo r email el ement task #583322 | |
| 172 | it('sh ould have email elem ent', () = > { | |
| 173 | co nst debugE lement: De bugElement = fixture .debugElem ent.query( By.css('#e mail')); | |
| 174 | co nst htmlEl ement: HTM LElement = debugElem ent.native Element; | |
| 175 | ||
| 176 | ex pect(htmlE lement).to BeTruthy() ; | |
| 177 | ex pect(htmlE lement.hid den).toEqu al(false); | |
| 178 | ex pect(htmlE lement.hid den).toBe( false); | |
| 179 | }); | |
| 180 | ||
| 181 | // kar ma test fo r email el ement task #583322 | |
| 182 | it('sh ould set i nput value for email address e lement', ( ) => { | |
| 183 | // first rou nd of chan ge detecti on | |
| 184 | fi xture.dete ctChanges( ); | |
| 185 | ||
| 186 | // get ahold of the in put | |
| 187 | co nst input = fixture. debugEleme nt.query(B y.css('#em ail')); | |
| 188 | co nst inputE lement = i nput.nativ eElement; | |
| 189 | ||
| 190 | // set input value | |
| 191 | inputEleme nt.value = PII '; | |
| 192 | in putElement .dispatchE vent(new E vent('inpu t')); | |
| 193 | ||
| 194 | expect(com ponent.ema ilAddress. email).toB e('ABC@ D O MAIN '); | |
| 195 | }); | |
| 196 | ||
| 197 | // kar ma test fo r email el ement task #583323 | |
| 198 | it('sh ould have cols creat ed', () => { | |
| 199 | ex pect(compo nent.cols) .toBeTruth y(); | |
| 200 | }); | |
| 201 | ||
| 202 | // kar ma test fo r email el ement task #583323 | |
| 203 | it('sh ould have tableOptio ns created ', () => { | |
| 204 | ex pect(compo nent.table Options).t oBeTruthy( ); | |
| 205 | }); | |
| 206 | ||
| 207 | // kar ma test fo r Search b utton elem ent task#5 83324 | |
| 208 | it('sh ould have Search but ton elemen t', () => { | |
| 209 | co nst debugE lement: De bugElement = fixture .debugElem ent.query( By.css('#s earch')); | |
| 210 | co nst htmlEl ement: HTM LElement = debugElem ent.native Element; | |
| 211 | ||
| 212 | ex pect(htmlE lement).to BeTruthy() ; | |
| 213 | ex pect(htmlE lement.hid den).toEqu al(false); | |
| 214 | ex pect(htmlE lement.hid den).toBe( false); | |
| 215 | ||
| 216 | }); | |
| 217 | ||
| 218 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.