File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed
__mocks__/@auth0/auth0-acul-js
screens/login-id/__tests__ Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,20 @@ default_screen_deployment_status:
195195
196196Only screens set to ` true ` in this configuration file will be processed by the deployment workflow for Advanced Mode. This allows you to selectively roll out your custom screens.
197197
198+ <a id =" testing " ></a >
199+
200+ ## Testing
201+
202+ This project uses [ Jest] ( https://jestjs.io/ ) for unit and integration testing of screen components.
203+
204+ ### Running Tests
205+
206+ To run the entire test suite:
207+
208+ ``` bash
209+ npm test
210+ ```
211+
198212<a id =" technical-details " ></a >
199213
200214## 🔍 Technical Details
Original file line number Diff line number Diff line change 66 */
77interface MockLoginIdInstance {
88 login : jest . Mock ;
9- socialLogin : jest . Mock ;
9+ federatedLogin : jest . Mock ;
1010 passkeyLogin : jest . Mock ;
1111 pickCountryCode : jest . Mock ;
1212 screen : {
@@ -38,7 +38,7 @@ interface MockLoginIdInstance {
3838
3939const mockLoginIdInstance : MockLoginIdInstance = {
4040 login : jest . fn ( ) ,
41- socialLogin : jest . fn ( ) ,
41+ federatedLogin : jest . fn ( ) ,
4242 passkeyLogin : jest . fn ( ) ,
4343 pickCountryCode : jest . fn ( ) ,
4444 screen : {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ describe("LoginIdScreen", () => {
1717 MockedLoginIdInstance . mockClear ( ) ;
1818 mockInstance = {
1919 login : jest . fn ( ) ,
20- socialLogin : jest . fn ( ) ,
20+ federatedLogin : jest . fn ( ) ,
2121 passkeyLogin : jest . fn ( ) ,
2222 pickCountryCode : jest . fn ( ) ,
2323 screen : {
@@ -255,7 +255,7 @@ describe("LoginIdScreen", () => {
255255 ) . toBeInTheDocument ( ) ;
256256 } ) ;
257257
258- it ( "should call socialLogin method when button clicked" , async ( ) => {
258+ it ( "should call federatedLogin method when button clicked" , async ( ) => {
259259 MockConfigUtils . configureTransaction ( mockInstance , {
260260 alternateConnections : [ CommonTestData . socialConnections [ 0 ] ] ,
261261 } ) ;
@@ -264,7 +264,7 @@ describe("LoginIdScreen", () => {
264264
265265 await ScreenTestUtils . clickButton ( / c o n t i n u e w i t h g o o g l e / i) ;
266266
267- expect ( mockInstance . socialLogin ) . toHaveBeenCalledWith ( {
267+ expect ( mockInstance . federatedLogin ) . toHaveBeenCalledWith ( {
268268 connection : "google-oauth2" ,
269269 } ) ;
270270 } ) ;
You can’t perform that action at this time.
0 commit comments