mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Fix tests
This commit is contained in:
parent
11f64f5164
commit
6c6f171e1c
@ -27,7 +27,7 @@ async function configureEmailAndWorkflow(workflowId: string, tsSource: string, e
|
||||
});
|
||||
}
|
||||
|
||||
const waitRetries = 15;
|
||||
const waitRetries = 25;
|
||||
|
||||
async function waitForMailboxSubject(mailbox: Mailbox, subject: string) {
|
||||
for (let i = 0; i < waitRetries; i++) {
|
||||
@ -101,7 +101,7 @@ test("onSignUp workflow sends email for client sign-up", async ({ expect }) => {
|
||||
]
|
||||
`);
|
||||
}, {
|
||||
timeout: 40_000,
|
||||
timeout: 60_000,
|
||||
});
|
||||
|
||||
test("onSignUp workflow can schedule callbacks", async ({ expect }) => {
|
||||
@ -156,7 +156,7 @@ test("onSignUp workflow can schedule callbacks", async ({ expect }) => {
|
||||
]
|
||||
`);
|
||||
}, {
|
||||
timeout: 40_000,
|
||||
timeout: 60_000,
|
||||
});
|
||||
|
||||
test("onSignUp workflow sends email for server-created user", async ({ expect }) => {
|
||||
@ -199,7 +199,7 @@ test("onSignUp workflow sends email for server-created user", async ({ expect })
|
||||
]
|
||||
`);
|
||||
}, {
|
||||
timeout: 40_000,
|
||||
timeout: 60_000,
|
||||
});
|
||||
|
||||
test("disabled workflows do not trigger", async ({ expect }) => {
|
||||
@ -215,7 +215,7 @@ test("disabled workflows do not trigger", async ({ expect }) => {
|
||||
|
||||
await Auth.Password.signUpWithEmail({ password: "password" });
|
||||
|
||||
await wait(25_000);
|
||||
await wait(waitRetries * 1_000 * 1.3);
|
||||
|
||||
expect(await mailbox.fetchMessages()).toMatchInlineSnapshot(`
|
||||
[
|
||||
@ -280,7 +280,7 @@ test("compile/runtime errors in one workflow don't block others", async ({ expec
|
||||
]
|
||||
`);
|
||||
}, {
|
||||
timeout: 40_000,
|
||||
timeout: 60_000,
|
||||
});
|
||||
|
||||
test("anonymous sign-up does not trigger; upgrade triggers workflow", async ({ expect }) => {
|
||||
@ -303,7 +303,7 @@ test("anonymous sign-up does not trigger; upgrade triggers workflow", async ({ e
|
||||
const { userId: anonUserId } = await Auth.Anonymous.signUp();
|
||||
|
||||
// ensure marker not present yet
|
||||
await wait(25_000);
|
||||
await wait(waitRetries * 1_000 * 1.3);
|
||||
const me1 = await niceBackendFetch("/api/v1/users/me", { accessType: "client" });
|
||||
expect(me1.body.server_metadata?.[markerKey]).toBeUndefined();
|
||||
|
||||
@ -316,7 +316,7 @@ test("anonymous sign-up does not trigger; upgrade triggers workflow", async ({ e
|
||||
expect(me2.body.is_anonymous).toBe(false);
|
||||
expect(me2.body.server_metadata?.[markerKey]).toBe(me2.body.primary_email);
|
||||
}, {
|
||||
timeout: 60_000,
|
||||
timeout: 90_000,
|
||||
});
|
||||
|
||||
test("workflow source changes take effect for subsequent sign-ups", async ({ expect }) => {
|
||||
@ -359,5 +359,5 @@ test("workflow source changes take effect for subsequent sign-ups", async ({ exp
|
||||
const me2 = await niceBackendFetch("/api/v1/users/me", { accessType: "server" });
|
||||
expect(me2.body.server_metadata?.[markerKey]).toBe("v2");
|
||||
}, {
|
||||
timeout: 60_000,
|
||||
timeout: 90_000,
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user