mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
## Description Direct templates links is a feature that provides template owners the ability to allow users to create documents based of their templates. ## General outline This works by allowing the template owner to configure a "direct recipient" in the template. When a user opens the direct link to the template, it will create a flow where they sign the fields configured by the template owner for the direct recipient. After these fields are signed the following will occur: - A document will be created where the owner is the template owner - The direct recipient fields will be signed - The document will be sent to any other recipients configured in the template - If there are none the document will be immediately completed ## Notes There's a custom prisma migration to migrate all documents to have 'DOCUMENT' as the source, then sets the column to required. --------- Co-authored-by: Lucas Smith <me@lucasjamessmith.me>
18 lines
569 B
TypeScript
18 lines
569 B
TypeScript
import type { Page } from '@playwright/test';
|
|
import { expect } from '@playwright/test';
|
|
|
|
export const checkDocumentTabCount = async (page: Page, tabName: string, count: number) => {
|
|
await page.getByRole('tab', { name: tabName }).click();
|
|
|
|
if (tabName !== 'All') {
|
|
await expect(page.getByRole('tab', { name: tabName })).toContainText(count.toString());
|
|
}
|
|
|
|
if (count === 0) {
|
|
await expect(page.getByTestId('empty-document-state')).toBeVisible();
|
|
return;
|
|
}
|
|
|
|
await expect(page.getByTestId('data-table-count')).toContainText(`Showing ${count}`);
|
|
};
|