The Open Source DocuSign Alternative.
TypeScript digital-signaturedocument-signingdocusign-alternativee-signatureesignesignaturenext-authnextjsopen-sourcepades-standardpdfpdf-signpdf-signaturepostgresqlprismaself-hostedsigningtypescript
chore: update failing tests
Mythieae5ae111a626
diff --git a/apps/web/src/app/(dashboard)/templates/template-direct-link-dialog.tsx b/apps/web/src/app/(dashboard)/templates/template-direct-link-dialog.tsxindex c4fe8d714..7bb67aea6 100644--- a/apps/web/src/app/(dashboard)/templates/template-direct-link-dialog.tsx+++ b/apps/web/src/app/(dashboard)/templates/template-direct-link-dialog.tsx@@ -46,6 +46,8 @@ import {import { Tooltip, TooltipContent, TooltipTrigger } from '@documenso/ui/primitives/tooltip';import { useToast } from '@documenso/ui/primitives/use-toast';+import { useOptionalCurrentTeam } from '~/providers/team';+type TemplateDirectLinkDialogProps = {template: Template & {directLink?: Pick<TemplateDirectLink, 'token' | 'enabled'> | null;@@ -65,6 +67,8 @@ export const TemplateDirectLinkDialog = ({const { toast } = useToast();const { quota, remaining } = useLimits();+ const team = useOptionalCurrentTeam();+const [, copy] = useCopyToClipboard();const router = useRouter();@@ -164,6 +168,7 @@ export const TemplateDirectLinkDialog = ({await createTemplateDirectLink({templateId: template.id,+ teamId: team?.id,directRecipientId: recipientId,});};@@ -316,6 +321,7 @@ export const TemplateDirectLinkDialog = ({onClick={async () =>createTemplateDirectLink({templateId: template.id,+ teamId: team?.id,})}>diff --git a/packages/app-tests/e2e/documents/delete-documents.spec.ts b/packages/app-tests/e2e/documents/delete-documents.spec.tsindex 32f385df5..8b5d4c587 100644--- a/packages/app-tests/e2e/documents/delete-documents.spec.ts+++ b/packages/app-tests/e2e/documents/delete-documents.spec.ts@@ -265,6 +265,8 @@ test('[DOCUMENTS]: deleting documents as a recipient should only hide it for theawait page.getByRole('menuitem', { name: 'Hide' }).click();await page.getByRole('button', { name: 'Hide' }).click();+ await page.waitForTimeout(1000);+// Open document action menu.await page.locator('tr', { hasText: 'Document 1 - Pending' })diff --git a/packages/trpc/server/template-router/router.ts b/packages/trpc/server/template-router/router.tsindex 262fe1dc8..2f2567d63 100644--- a/packages/trpc/server/template-router/router.ts+++ b/packages/trpc/server/template-router/router.ts@@ -244,11 +244,11 @@ export const templateRouter = router({.input(ZCreateTemplateDirectLinkMutationSchema).mutation(async ({ input, ctx }) => {try {- const { templateId, directRecipientId } = input;+ const { templateId, teamId, directRecipientId } = input;const userId = ctx.user.id;- const template = await getTemplateById({ id: templateId, userId: ctx.user.id });+ const template = await getTemplateById({ id: templateId, teamId, userId: ctx.user.id });const limits = await getServerLimits({ email: ctx.user.email, teamId: template.teamId });diff --git a/packages/trpc/server/template-router/schema.ts b/packages/trpc/server/template-router/schema.tsindex e3d38044a..29f815f35 100644--- a/packages/trpc/server/template-router/schema.ts+++ b/packages/trpc/server/template-router/schema.ts@@ -49,6 +49,7 @@ export const ZDuplicateTemplateMutationSchema = z.object({export const ZCreateTemplateDirectLinkMutationSchema = z.object({templateId: z.number().min(1),+ teamId: z.number().optional(),directRecipientId: z.number().min(1).optional(),});