@@ -26,12 +26,13 @@ import {
2626 assertNoSTComponents ,
2727 generateState ,
2828 clickOnProviderButton ,
29- loginWithAuth0 ,
29+ loginWithMockProvider ,
3030 getGeneralError ,
3131 waitFor ,
3232 screenshotOnFailure ,
3333 clickOnProviderButtonWithoutWaiting ,
3434 backendBeforeEach ,
35+ loginWithAuth0 ,
3536} from "../helpers" ;
3637
3738import { TEST_CLIENT_BASE_URL , TEST_SERVER_BASE_URL , SIGN_IN_UP_API , GET_AUTH_URL_API } from "../constants" ;
@@ -136,37 +137,37 @@ export function getThirdPartyTestCases({ authRecipe, rid, logId, signInUpPageLoa
136137 ] ) ;
137138 } ) ;
138139
139- it ( "Successful sign in with Auth0 with redirectToPath (w/ leading slash) keeping query params" , async function ( ) {
140+ it ( "Successful sign in with redirectToPath (w/ leading slash) keeping query params" , async function ( ) {
140141 await Promise . all ( [
141142 page . goto ( `${ TEST_CLIENT_BASE_URL } /auth?redirectToPath=%2Fredirect-here%3Ffoo%3Dbar` ) ,
142143 page . waitForNavigation ( { waitUntil : "networkidle0" } ) ,
143144 ] ) ;
144145 await assertProviders ( page ) ;
145- await clickOnProviderButton ( page , "Auth0 " ) ;
146+ await clickOnProviderButton ( page , "Mock Provider " ) ;
146147 await Promise . all ( [
147- loginWithAuth0 ( page ) ,
148+ loginWithMockProvider ( page ) ,
148149 page . waitForResponse ( ( response ) => response . url ( ) === SIGN_IN_UP_API && response . status ( ) === 200 ) ,
149150 ] ) ;
150151 const { pathname, search } = await page . evaluate ( ( ) => window . location ) ;
151152 assert . deepStrictEqual ( pathname + search , "/redirect-here?foo=bar" ) ;
152153 } ) ;
153154
154- it ( "Successful sign in with Auth0 with redirectToPath (w/o leading slash) keeping query params" , async function ( ) {
155+ it ( "Successful sign in with SSO with redirectToPath (w/o leading slash) keeping query params" , async function ( ) {
155156 await Promise . all ( [
156157 page . goto ( `${ TEST_CLIENT_BASE_URL } /auth?redirectToPath=%3Ffoo%3Dbar` ) ,
157158 page . waitForNavigation ( { waitUntil : "networkidle0" } ) ,
158159 ] ) ;
159160 await assertProviders ( page ) ;
160- await clickOnProviderButton ( page , "Auth0 " ) ;
161+ await clickOnProviderButton ( page , "Mock Provider " ) ;
161162 await Promise . all ( [
162- loginWithAuth0 ( page ) ,
163+ loginWithMockProvider ( page ) ,
163164 page . waitForResponse ( ( response ) => response . url ( ) === SIGN_IN_UP_API && response . status ( ) === 200 ) ,
164165 ] ) ;
165166 const { pathname, search } = await page . evaluate ( ( ) => window . location ) ;
166167 assert . deepStrictEqual ( pathname + search , "/?foo=bar" ) ;
167168 } ) ;
168169
169- it ( "Successful sign in with Auth0 with redirectToPath (query params + fragment)" , async function ( ) {
170+ it ( "Successful sign in with SSO with redirectToPath (query params + fragment)" , async function ( ) {
170171 await Promise . all ( [
171172 page . goto (
172173 `${ TEST_CLIENT_BASE_URL } /auth?redirectToPath=${ encodeURIComponent (
@@ -176,39 +177,39 @@ export function getThirdPartyTestCases({ authRecipe, rid, logId, signInUpPageLoa
176177 page . waitForNavigation ( { waitUntil : "networkidle0" } ) ,
177178 ] ) ;
178179 await assertProviders ( page ) ;
179- await clickOnProviderButton ( page , "Auth0 " ) ;
180+ await clickOnProviderButton ( page , "Mock Provider " ) ;
180181 await Promise . all ( [
181- loginWithAuth0 ( page ) ,
182+ loginWithMockProvider ( page ) ,
182183 page . waitForResponse ( ( response ) => response . url ( ) === SIGN_IN_UP_API && response . status ( ) === 200 ) ,
183184 ] ) ;
184185 const { pathname, search, hash } = await page . evaluate ( ( ) => window . location ) ;
185186 assert . deepStrictEqual ( pathname + search + hash , "/redirect-here?foo=bar#cell=4,1-6,2" ) ;
186187 } ) ;
187188
188- it ( "Successful sign in with Auth0 with redirectToPath (only fragment)" , async function ( ) {
189+ it ( "Successful sign in with SSO with redirectToPath (only fragment)" , async function ( ) {
189190 await Promise . all ( [
190191 page . goto ( `${ TEST_CLIENT_BASE_URL } /auth?redirectToPath=${ encodeURIComponent ( "#cell=4,1-6,2" ) } ` ) ,
191192 page . waitForNavigation ( { waitUntil : "networkidle0" } ) ,
192193 ] ) ;
193194 await assertProviders ( page ) ;
194- await clickOnProviderButton ( page , "Auth0 " ) ;
195+ await clickOnProviderButton ( page , "Mock Provider " ) ;
195196 await Promise . all ( [
196- loginWithAuth0 ( page ) ,
197+ loginWithMockProvider ( page ) ,
197198 page . waitForResponse ( ( response ) => response . url ( ) === SIGN_IN_UP_API && response . status ( ) === 200 ) ,
198199 ] ) ;
199200 const { pathname, search, hash } = await page . evaluate ( ( ) => window . location ) ;
200201 assert . deepStrictEqual ( pathname + search + hash , "/#cell=4,1-6,2" ) ;
201202 } ) ;
202203
203- it ( "Successful signin with Auth0 and email verification" , async function ( ) {
204+ it ( "Successful signin with SSO and email verification" , async function ( ) {
204205 await Promise . all ( [
205206 page . goto ( `${ TEST_CLIENT_BASE_URL } /auth?mode=REQUIRED` ) ,
206207 page . waitForNavigation ( { waitUntil : "networkidle0" } ) ,
207208 ] ) ;
208209 await assertProviders ( page ) ;
209- await clickOnProviderButton ( page , "Auth0 " ) ;
210+ await clickOnProviderButton ( page , "Mock Provider " ) ;
210211 await Promise . all ( [
211- loginWithAuth0 ( page ) ,
212+ loginWithMockProvider ( page ) ,
212213 page . waitForResponse ( ( response ) => response . url ( ) === SIGN_IN_UP_API && response . status ( ) === 200 ) ,
213214 ] ) ;
214215 const pathname = await page . evaluate ( ( ) => window . location . pathname ) ;
@@ -241,30 +242,30 @@ export function getThirdPartyTestCases({ authRecipe, rid, logId, signInUpPageLoa
241242 ] ) ;
242243 } ) ;
243244
244- it ( "Successful signin with auth0 and redirectToPath" , async function ( ) {
245+ it ( "Successful signin with SSO and redirectToPath" , async function ( ) {
245246 await Promise . all ( [
246247 page . goto ( `${ TEST_CLIENT_BASE_URL } /auth?redirectToPath=/hello` ) ,
247248 page . waitForNavigation ( { waitUntil : "networkidle0" } ) ,
248249 ] ) ;
249250 await assertProviders ( page ) ;
250- await clickOnProviderButton ( page , "Auth0 " ) ;
251+ await clickOnProviderButton ( page , "Mock Provider " ) ;
251252 await Promise . all ( [
252- loginWithAuth0 ( page ) ,
253+ loginWithMockProvider ( page ) ,
253254 page . waitForResponse ( ( response ) => response . url ( ) === SIGN_IN_UP_API && response . status ( ) === 200 ) ,
254255 ] ) ;
255256 const pathname = await page . evaluate ( ( ) => window . location . pathname ) ;
256257 assert . deepStrictEqual ( pathname , "/hello" ) ;
257258 } ) ;
258259
259- it ( "Successful signin with auth0 and redirectToPath case sensitive" , async function ( ) {
260+ it ( "Successful signin with SSO and redirectToPath case sensitive" , async function ( ) {
260261 await Promise . all ( [
261262 page . goto ( `${ TEST_CLIENT_BASE_URL } /auth?redirectToPath=%2FCasE%2FCase-SensItive1-PAth` ) ,
262263 page . waitForNavigation ( { waitUntil : "networkidle0" } ) ,
263264 ] ) ;
264265 await assertProviders ( page ) ;
265- await clickOnProviderButton ( page , "Auth0 " ) ;
266+ await clickOnProviderButton ( page , "Mock Provider " ) ;
266267 await Promise . all ( [
267- loginWithAuth0 ( page ) ,
268+ loginWithMockProvider ( page ) ,
268269 page . waitForResponse ( ( response ) => response . url ( ) === SIGN_IN_UP_API && response . status ( ) === 200 ) ,
269270 ] ) ;
270271 const pathname = await page . evaluate ( ( ) => window . location . pathname ) ;
@@ -359,8 +360,8 @@ export function getThirdPartyTestCases({ authRecipe, rid, logId, signInUpPageLoa
359360 }
360361 } ;
361362 page . on ( "request" , requestHandler ) ;
362- await clickOnProviderButton ( page , "Auth0 " ) ;
363- await loginWithAuth0 ( page ) ;
363+ await clickOnProviderButton ( page , "Mock Provider " ) ;
364+ await loginWithMockProvider ( page ) ;
364365 const error = await getGeneralError ( page ) ;
365366 assert . deepStrictEqual ( error , "Terms of Service" ) ;
366367 } ) ;
@@ -395,8 +396,8 @@ export function getThirdPartyTestCases({ authRecipe, rid, logId, signInUpPageLoa
395396 } ;
396397 page . on ( "request" , requestHandler ) ;
397398
398- await clickOnProviderButton ( page , "Auth0 " ) ;
399- await loginWithAuth0 ( page ) ;
399+ await clickOnProviderButton ( page , "Mock Provider " ) ;
400+ await loginWithMockProvider ( page ) ;
400401
401402 const error = await getGeneralError ( page ) ;
402403 assert . deepStrictEqual ( error , "Test message!!!!" ) ;
0 commit comments