Skip to content

Commit 60f4061

Browse files
alexcarpenterwobsoriano
authored andcommitted
Revert "fix(e2e): Runs email-link tests" (#4909)
1 parent 816d895 commit 60f4061

File tree

4 files changed

+8
-19
lines changed

4 files changed

+8
-19
lines changed

integration/testUtils/emailService.ts

+1-12
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ type Message = {
55
subject: string;
66
};
77

8-
interface ErrorResponse {
9-
message: string;
10-
error: string;
11-
}
12-
13-
type InboxFilterResponse = { messages: Message[] } | ErrorResponse;
14-
158
export const createEmailService = () => {
169
const cleanEmail = (email: string) => {
1710
return email.replace(/\+.*@/, '@');
@@ -34,11 +27,7 @@ export const createEmailService = () => {
3427
return runWithExponentialBackOff(
3528
async () => {
3629
const res = await fetcher(url);
37-
const json = (await res.json()) as InboxFilterResponse;
38-
if ('message' in json) {
39-
throw new Error(`Mailsac API Error: ${json.error} - ${json.message}`);
40-
}
41-
30+
const json = (await res.json()) as unknown as { messages: Message[] };
4231
const message = json.messages[0];
4332
if (!message) {
4433
throw new Error('message not found');

integration/tests/email-link.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import type { Application } from '../models/application';
55
import { appConfigs } from '../presets';
66
import { createTestUtils } from '../testUtils';
77

8-
test.describe('sign up and sign in using email link @generic', () => {
9-
const configs = [appConfigs.next.appRouter, appConfigs.react.vite];
8+
test.describe('sign up and sign in using email link', () => {
9+
const configs = [];
1010

1111
configs.forEach(config => {
1212
test.describe(`${config.name}`, () => {
@@ -81,7 +81,7 @@ const performSignUpVerificationLinkSameDevice = async (
8181
searchParams?: URLSearchParams,
8282
) => {
8383
const u = createTestUtils({ app, page, context });
84-
const fakeUser = u.services.users.createFakeUser({ fictionalEmail: false, withPassword: true });
84+
const fakeUser = u.services.users.createFakeUser();
8585
await u.po.signUp.goTo({ searchParams });
8686
await u.po.signUp.signUpWithEmailAndPassword({ email: fakeUser.email, password: fakeUser.password });
8787
await u.po.signUp.waitForEmailVerificationScreen();
@@ -103,7 +103,7 @@ const performSignUpVerificationLinkDifferentDevice = async (
103103
searchParams?: URLSearchParams,
104104
) => {
105105
const u = createTestUtils({ app, page, context, browser });
106-
const fakeUser = u.services.users.createFakeUser({ fictionalEmail: false, withPassword: true });
106+
const fakeUser = u.services.users.createFakeUser();
107107
await u.po.signUp.goTo({ searchParams });
108108
await u.po.signUp.signUpWithEmailAndPassword({ email: fakeUser.email, password: fakeUser.password });
109109
await u.po.signUp.waitForEmailVerificationScreen();

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"test:integration:elements": "E2E_APP_ID=elements.* pnpm test:integration:base --grep @elements",
3535
"test:integration:expo-web": "E2E_APP_ID=expo.expo-web pnpm test:integration:base --grep @expo-web",
3636
"test:integration:express": "E2E_APP_ID=express.* pnpm test:integration:base --grep @express",
37-
"test:integration:generic": "E2E_APP_ID=react.vite.*,next.appRouter.* pnpm test:integration:base --grep @generic",
37+
"test:integration:generic": "E2E_APP_ID=react.vite.*,next.appRouter.withEmailCodes* pnpm test:integration:base --grep @generic",
3838
"test:integration:nextjs": "E2E_APP_ID=next.appRouter.* pnpm test:integration:base --grep @nextjs",
3939
"test:integration:nuxt": "E2E_APP_ID=nuxt.node npm run test:integration:base -- --grep @nuxt",
4040
"test:integration:quickstart": "E2E_APP_ID=quickstart.* pnpm test:integration:base --grep @quickstart",

turbo.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
},
147147
"//#test:integration:generic": {
148148
"dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/clerk-react#build"],
149-
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "MAILSAC_API_KEY"],
149+
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
150150
"inputs": ["integration/**"],
151151
"outputLogs": "new-only"
152152
},
@@ -163,7 +163,7 @@
163163
},
164164
"//#test:integration:nextjs": {
165165
"dependsOn": ["@clerk/clerk-js#build", "@clerk/backend#build", "@clerk/nextjs#build"],
166-
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS", "MAILSAC_API_KEY"],
166+
"env": ["CLEANUP", "DEBUG", "E2E_*", "INTEGRATION_INSTANCE_KEYS"],
167167
"inputs": ["integration/**"],
168168
"outputLogs": "new-only"
169169
},

0 commit comments

Comments
 (0)