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.
25 lines
986 B
TypeScript
25 lines
986 B
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
import { NEXT_PUBLIC_WEBAPP_URL } from '@hanzo/esign-lib/constants/app';
|
|
import { getUserByEmail } from '@hanzo/esign-lib/server-only/user/get-user-by-email';
|
|
import { seedUser } from '@hanzo/esign-prisma/seed/users';
|
|
|
|
import { apiSignin } from '../fixtures/authentication';
|
|
|
|
test('[USER] delete account', async ({ page }) => {
|
|
const { user } = await seedUser();
|
|
|
|
await apiSignin({ page, email: user.email, redirectPath: '/settings' });
|
|
|
|
await page.getByRole('button', { name: 'Delete Account' }).click();
|
|
await page.getByLabel('Confirm Email').fill(user.email);
|
|
|
|
await expect(page.getByRole('button', { name: 'Confirm Deletion' })).not.toBeDisabled();
|
|
await page.getByRole('button', { name: 'Confirm Deletion' }).click();
|
|
|
|
await page.waitForURL(`${NEXT_PUBLIC_WEBAPP_URL()}/signin`);
|
|
|
|
// Verify that the user no longer exists in the database
|
|
await expect(getUserByEmail({ email: user.email })).rejects.toThrow();
|
|
});
|