Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-endform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
set-vercel-bypass-env-var: VERCEL_BYPASS_TOKEN

- name: Run end to end tests with Endform
run: npx endform@latest test
run: npx endform@latest test --repeat-each 20 --max-failures 0 -g "team invitation in the activity log"
47 changes: 0 additions & 47 deletions .github/workflows/e2e-intent.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/e2e-playwright.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/endform-tests-on-main.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/endform-tests-on-prs.yml

This file was deleted.

18 changes: 11 additions & 7 deletions app/(login)/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,17 @@ export const inviteTeamMember = validatedActionWithUser(
})
.returning();

// Email the invitee and log the invite once the response has been sent,
// so inviting feels instant.
const teamId = userWithTeam.teamId;
after(async () => {
await sendInvitationEmail(email, role);
await logActivity(teamId, user.id, ActivityType.INVITE_TEAM_MEMBER);
});
// The activity log is the team's record of what happened, so it is written
// with the invitation and is there as soon as the inviter looks for it.
await logActivity(
userWithTeam.teamId,
user.id,
ActivityType.INVITE_TEAM_MEMBER,
);

// The email provider has a slow tail, so send once the response has gone
// out and inviting still feels instant.
after(() => sendInvitationEmail(email, role));

return { success: "Invitation sent successfully", id: invitation[0].id };
},
Expand Down
Loading