feat: add envelope editor

This commit is contained in:
David Nguyen
2025-10-12 23:35:54 +11:00
parent bf89bc781b
commit 0da8e7dbc6
307 changed files with 24657 additions and 3681 deletions

View File

@ -2,6 +2,7 @@ import type { Page } from '@playwright/test';
import { expect, test } from '@playwright/test';
import { getTemplateById } from '@documenso/lib/server-only/template/get-template-by-id';
import { mapSecondaryIdToTemplateId } from '@documenso/lib/utils/envelope';
import { seedBlankTemplate } from '@documenso/prisma/seed/templates';
import { seedUser } from '@documenso/prisma/seed/users';
@ -14,7 +15,7 @@ const setupTemplateAndNavigateToFieldsStep = async (page: Page) => {
await apiSignin({
page,
email: user.email,
redirectPath: `/templates/${template.id}/edit`,
redirectPath: `/t/${team.url}/templates/${mapSecondaryIdToTemplateId(template.secondaryId)}/edit`,
});
await page.getByRole('button', { name: 'Continue' }).click();
@ -85,7 +86,10 @@ test.describe('AutoSave Fields Step', () => {
await expect(async () => {
const retrievedFields = await getTemplateById({
id: template.id,
id: {
type: 'envelopeId',
id: template.id,
},
userId: user.id,
teamId: team.id,
});
@ -152,7 +156,10 @@ test.describe('AutoSave Fields Step', () => {
await expect(async () => {
const retrievedFields = await getTemplateById({
id: template.id,
id: {
type: 'envelopeId',
id: template.id,
},
userId: user.id,
teamId: team.id,
});
@ -218,7 +225,11 @@ test.describe('AutoSave Fields Step', () => {
await expect(async () => {
const retrievedFields = await getTemplateById({
id: template.id,
id: {
type: 'envelopeId',
id: template.id,
},
userId: user.id,
teamId: team.id,
});
@ -270,7 +281,10 @@ test.describe('AutoSave Fields Step', () => {
await expect(async () => {
const retrievedTemplate = await getTemplateById({
id: template.id,
id: {
type: 'envelopeId',
id: template.id,
},
userId: user.id,
teamId: team.id,
});