Produced by Araxis Merge on 4/2/2019 1:08:02 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.
# | Location | File | Last Modified |
---|---|---|---|
1 | C:\AraxisMergeCompare\Pri_un\ARS_Frontend\ars-app\src\app\login | login.component.spec.ts | Wed Mar 27 19:16:21 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\ARS_Frontend\ars-app\src\app\login | login.component.spec.ts | Fri Mar 29 18:17:28 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 252 |
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 { Authenti cationServ ice } from './login. service'; | |
2 | // import { DomSanit izer } fro m '@angula r/platform -browser'; | |
3 | ||
4 | // import { Observab le } from 'rxjs/Obse rvable'; | |
5 | // import { Observer } from 'r xjs/Observ er'; | |
6 | ||
7 | // import { LoginCom ponent } f rom './log in.compone nt'; | |
8 | // import { SsoEncod edUrlsMode l } from ' ./login.mo del'; | |
9 | ||
10 | // describ e('LoginCo mponent', () => { | |
11 | // let c omponent: LoginCompo nent; | |
12 | ||
13 | // let a uthenticat ionService : Authenti cationServ ice; | |
14 | // let s anitizer; | |
15 | ||
16 | // befor eEach(() = > { | |
17 | // aut henticatio nService = new Authe nticationS ervice(nul l); | |
18 | // san itizer = { bypassSec urityTrust Url: () = > true }; | |
19 | ||
20 | // com ponent = n ew LoginCo mponent(au thenticati onService, sanitizer , null); | |
21 | // }); | |
22 | ||
23 | // it('s hould be c reated', ( ) => { | |
24 | // exp ect(compon ent).toBeT ruthy(); | |
25 | // }); | |
26 | ||
27 | // it('t est ngOnIn it: normal return wi th no erro rs on call to "authe nticationS ervice.sso Urls" meth od', () => { | |
28 | // let getErrorM sgReturnDa ta = { | |
29 | // errorMsg: 'Error Me ssage from call to g etErrorMsg method!', | |
30 | // errorStat us: true | |
31 | // }; | |
32 | // spy On(authent icationSer vice, 'get ErrorMsg') .and.callF ake( | |
33 | // () => new Observabl e((observe r: Observe r<{}>) => observer.n ext(getErr orMsgRetur nData)) | |
34 | // ); | |
35 | ||
36 | // let returnedS soUrlsData = new Sso EncodedUrl sModel(); | |
37 | // spy On(authent icationSer vice, 'sso Urls').and .callFake( | |
38 | // () => new Observabl e((observe r: Observe r<{}>) => observer.n ext(return edSsoUrlsD ata)) | |
39 | // ); | |
40 | ||
41 | // let bypassSec urityTrust UrlReturne dData = 'A _SAFE_URL' ; | |
42 | // spy On(sanitiz er, 'bypas sSecurityT rustUrl'). and.callFa ke( | |
43 | // () => byp assSecurit yTrustUrlR eturnedDat a | |
44 | // ) ; | |
45 | ||
46 | // spy On(console , 'log'); | |
47 | ||
48 | // exp ect(compon ent.errorM sg).toEqua l(''); | |
49 | // exp ect(compon ent.errorS tatus).toE qual(false ); | |
50 | // exp ect(compon ent.sso).t oEqual(und efined); | |
51 | // exp ect(compon ent.safeUr l).toEqual (undefined ); | |
52 | ||
53 | // com ponent.ngO nInit(); | |
54 | ||
55 | // exp ect(authen ticationSe rvice.getE rrorMsg).t oHaveBeenC alled(); | |
56 | // exp ect(authen ticationSe rvice.ssoU rls).toHav eBeenCalle d(); | |
57 | // exp ect(saniti zer.bypass SecurityTr ustUrl).to HaveBeenCa lled(); | |
58 | // exp ect(saniti zer.bypass SecurityTr ustUrl).to HaveBeenCa lledWith( | |
59 | // 'https:// SERVER . DOMAIN . EXT /Applicati onManager/ Authentica te/Post'); | |
60 | // exp ect(consol e.log).not .toHaveBee nCalled(); | |
61 | ||
62 | // exp ect(compon ent.errorM sg).toEqua l(getError MsgReturnD ata.errorM sg); | |
63 | // exp ect(compon ent.errorS tatus).toE qual(true) ; | |
64 | // exp ect(compon ent.sso).t oEqual(ret urnedSsoUr lsData); | |
65 | // exp ect(compon ent.safeUr l).toEqual ('A_SAFE_U RL'); | |
66 | // }); | |
67 | ||
68 | // it('t est ngOnIn it: error return on call to "a uthenticat ionService .ssoUrls" method', ( ) => { | |
69 | // let getErrorM sgReturnDa ta = { | |
70 | // errorMsg: '', | |
71 | // errorStat us: false | |
72 | // }; | |
73 | // spy On(authent icationSer vice, 'get ErrorMsg') .and.callF ake( | |
74 | // () => new Observabl e((observe r: Observe r<{}>) => observer.n ext(getErr orMsgRetur nData)) | |
75 | // ); | |
76 | ||
77 | // let returnedS soUrlsErro r = { | |
78 | // message: 'Error Mes sage from call to ss oUrls meth od!' | |
79 | // } | |
80 | // spy On(authent icationSer vice, 'sso Urls').and .returnVal ue(Observa ble.throw( returnedSs oUrlsError )); | |
81 | ||
82 | // let bypassSec urityTrust UrlReturne dData = 'A _SAFE_URL' ; | |
83 | // spy On(sanitiz er, 'bypas sSecurityT rustUrl'). and.callFa ke( | |
84 | // () => byp assSecurit yTrustUrlR eturnedDat a | |
85 | // ) ; | |
86 | ||
87 | // spy On(console , 'log'); | |
88 | ||
89 | // exp ect(compon ent.errorM sg).toEqua l(''); | |
90 | // exp ect(compon ent.errorS tatus).toE qual(false ); | |
91 | // exp ect(compon ent.sso).t oEqual(und efined); | |
92 | // exp ect(compon ent.safeUr l).toEqual (undefined ); | |
93 | ||
94 | // com ponent.ngO nInit(); | |
95 | ||
96 | // exp ect(authen ticationSe rvice.getE rrorMsg).t oHaveBeenC alled(); | |
97 | // exp ect(authen ticationSe rvice.ssoU rls).toHav eBeenCalle d(); | |
98 | // exp ect(saniti zer.bypass SecurityTr ustUrl).to HaveBeenCa lled(); | |
99 | // exp ect(saniti zer.bypass SecurityTr ustUrl).to HaveBeenCa lledWith( | |
100 | // 'https:// SERVER . DOMAIN . EXT /Applicati onManager/ Authentica te/Post'); | |
101 | // exp ect(consol e.log).toH aveBeenCal led(); | |
102 | // exp ect(consol e.log).toH aveBeenCal ledWith(re turnedSsoU rlsError); | |
103 | ||
104 | // exp ect(compon ent.errorM sg).toEqua l(returned SsoUrlsErr or.message ); | |
105 | // exp ect(compon ent.errorS tatus).toE qual(false ); | |
106 | // exp ect(compon ent.sso).t oEqual(und efined); | |
107 | // exp ect(compon ent.safeUr l).toEqual ('A_SAFE_U RL'); | |
108 | // }); | |
109 | ||
110 | // it('t est accept method:', () => { | |
111 | // com ponent.sso = new Sso EncodedUrl sModel(); | |
112 | ||
113 | // let returnNtN ame = 'NT_ NAME'; | |
114 | // let returnedN tNameObser vable = ne w Observab le((observ er: Observ er<{}>) => observer. next(retur nNtName)); | |
115 | // spy On(authent icationSer vice, 'get NtName').a nd.callFak e( | |
116 | // ( ) => retur nedNtNameO bservable | |
117 | // ); | |
118 | ||
119 | // spy On(returne dNtNameObs ervable, ' subscribe' ); | |
120 | ||
121 | // com ponent.acc ept(); | |
122 | ||
123 | // exp ect(authen ticationSe rvice.getN tName).toH aveBeenCal led(); | |
124 | // exp ect(authen ticationSe rvice.getN tName).toH aveBeenCal ledWith(co mponent.ss o); | |
125 | // exp ect(return edNtNameOb servable.s ubscribe). toHaveBeen Called(); | |
126 | // }); | |
127 | ||
128 | // }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.