mirror of
https://github.com/documenso/documenso.git
synced 2026-07-11 13:35:20 +10:00
138d663c25
Merge origin/main into feat/external-2fa-codes. Resolve formatting conflicts caused by biome rollout; preserve both feature streams: PR's external 2FA token + signing-session 2FA proof additions plus main's RateLimit/RecipientExpired/signingReminders/date-auto-insert. In complete-document-with-token.ts, drop the duplicate early field-fetching block introduced when main moved that logic later with date auto-insert support; keep the EXTERNAL_TWO_FACTOR_AUTH check using derivedRecipientActionAuth.
54 lines
1.8 KiB
TypeScript
54 lines
1.8 KiB
TypeScript
import { seedPendingDocument } from '@documenso/prisma/seed/documents';
|
|
import { seedUser } from '@documenso/prisma/seed/users';
|
|
import { expect, test } from '@playwright/test';
|
|
|
|
import { apiSignin } from '../fixtures/authentication';
|
|
|
|
test('[COMMAND_MENU]: should see sent documents', async ({ page }) => {
|
|
const { user, team } = await seedUser();
|
|
const { user: recipient } = await seedUser();
|
|
const document = await seedPendingDocument(user, team.id, [recipient]);
|
|
|
|
await apiSignin({
|
|
page,
|
|
email: user.email,
|
|
});
|
|
|
|
await page.keyboard.press('Meta+K');
|
|
|
|
await page.getByPlaceholder('Type a command or search...').first().fill(document.title);
|
|
await expect(page.getByRole('option', { name: document.title })).toBeVisible();
|
|
});
|
|
|
|
test('[COMMAND_MENU]: should see received documents', async ({ page }) => {
|
|
const { user, team } = await seedUser();
|
|
const { user: recipient } = await seedUser();
|
|
const document = await seedPendingDocument(user, team.id, [recipient]);
|
|
|
|
await apiSignin({
|
|
page,
|
|
email: recipient.email,
|
|
});
|
|
|
|
await page.keyboard.press('Meta+K');
|
|
|
|
await page.getByPlaceholder('Type a command or search...').first().fill(document.title);
|
|
await expect(page.getByRole('option', { name: document.title })).toBeVisible();
|
|
});
|
|
|
|
test('[COMMAND_MENU]: should be able to search by recipient', async ({ page }) => {
|
|
const { user, team } = await seedUser();
|
|
const { user: recipient } = await seedUser();
|
|
const document = await seedPendingDocument(user, team.id, [recipient]);
|
|
|
|
await apiSignin({
|
|
page,
|
|
email: user.email,
|
|
});
|
|
|
|
await page.keyboard.press('Meta+K');
|
|
|
|
await page.getByPlaceholder('Type a command or search...').first().fill(recipient.email);
|
|
await expect(page.getByRole('option', { name: document.title })).toBeVisible();
|
|
});
|