Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(e2e): Update sign-in-or-up tests #4872

14 changes: 9 additions & 5 deletions integration/presets/envs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,14 @@ const withWaitlistdMode = withEmailCodes
.setEnvVariable('private', 'CLERK_SECRET_KEY', instanceKeys.get('with-waitlist-mode').sk)
.setEnvVariable('public', 'CLERK_PUBLISHABLE_KEY', instanceKeys.get('with-waitlist-mode').pk);

const withCombinedFlow = withEmailCodes
const withSignInOrUpFlow = withEmailCodes
.clone()
.setId('withCombinedFlow')
.setEnvVariable('private', 'CLERK_SECRET_KEY', instanceKeys.get('with-email-codes').sk)
.setEnvVariable('public', 'CLERK_PUBLISHABLE_KEY', instanceKeys.get('with-email-codes').pk)
.setId('withSignInOrUpFlow')
.setEnvVariable('public', 'CLERK_SIGN_UP_URL', undefined);

const withSignInOrUpEmailLinksFlow = withEmailLinks
.clone()
.setId('withSignInOrUpEmailLinksFlow')
.setEnvVariable('public', 'CLERK_SIGN_UP_URL', undefined);

export const envs = {
Expand All @@ -136,5 +139,6 @@ export const envs = {
withRestrictedMode,
withLegalConsent,
withWaitlistdMode,
withCombinedFlow,
withSignInOrUpFlow,
withSignInOrUpEmailLinksFlow,
} as const;
7 changes: 6 additions & 1 deletion integration/presets/longRunningApps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ export const createLongRunningApps = () => {
},
{ id: 'next.appRouter.withCustomRoles', config: next.appRouter, env: envs.withCustomRoles },
{ id: 'next.appRouter.withReverification', config: next.appRouter, env: envs.withReverification },
{ id: 'next.appRouter.withCombinedFlow', config: next.appRouter, env: envs.withCombinedFlow },
{ id: 'next.appRouter.withSignInOrUpFlow', config: next.appRouter, env: envs.withSignInOrUpFlow },
{
id: 'next.appRouter.withSignInOrUpEmailLinksFlow',
config: next.appRouter,
env: envs.withSignInOrUpEmailLinksFlow,
},
{ id: 'quickstart.next.appRouter', config: next.appRouterQuickstart, env: envs.withEmailCodesQuickstart },
{ id: 'elements.next.appRouter', config: elements.nextAppRouter, env: envs.withEmailCodes },
{ id: 'astro.node.withCustomRoles', config: astro.node, env: envs.withCustomRoles },
Expand Down
160 changes: 0 additions & 160 deletions integration/tests/combined-sign-in-flow.test.ts

This file was deleted.

122 changes: 0 additions & 122 deletions integration/tests/combined-sign-up-flow.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion integration/tests/sign-in-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign in f
await u.po.expect.toBeSignedIn();
});

test('access protected page @express', async ({ page, context }) => {
test('access protected page', async ({ page, context }) => {
const u = createTestUtils({ app, page, context });
await u.po.signIn.goTo();
await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password });
Expand Down
Loading
Loading