mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-21 01:21:51 +00:00
The product is branded Hanzo eSign (esign.hanzo.ai, repo hanzoai/esign). Rename all workspace packages @hanzo/sign-* → @hanzo/esign-* (1052 files) and align docker/Dockerfile turbo --scope/--filter to the actual remix package name @hanzo/esign (was a pre-existing mismatch with -remix that broke the build). Protected deps (@hanzo/insights, @hanzo/logo) untouched.
55 lines
1.8 KiB
TypeScript
55 lines
1.8 KiB
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
import { seedPendingDocument } from '@hanzo/esign-prisma/seed/documents';
|
|
import { seedUser } from '@hanzo/esign-prisma/seed/users';
|
|
|
|
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: recipient.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();
|
|
});
|