mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 02:01:33 +10:00
feat: fix auth issue
This commit is contained in:
@ -15,6 +15,11 @@ NEXT_PRIVATE_DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documen
|
|||||||
# Defines the URL to use for the database when running migrations and other commands that won't work with a connection pool.
|
# Defines the URL to use for the database when running migrations and other commands that won't work with a connection pool.
|
||||||
NEXT_PRIVATE_DIRECT_DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documenso"
|
NEXT_PRIVATE_DIRECT_DATABASE_URL="postgres://documenso:password@127.0.0.1:54320/documenso"
|
||||||
|
|
||||||
|
# [[E2E Tests]]
|
||||||
|
E2E_TEST_USERNAME=""
|
||||||
|
E2E_TEST_USER_EMAIL=""
|
||||||
|
E2E_TEST_USER_PASSWORD=""
|
||||||
|
|
||||||
# [[SMTP]]
|
# [[SMTP]]
|
||||||
# OPTIONAL: Defines the transport to use for sending emails. Available options: smtp-auth (default) | smtp-api | mailchannels
|
# OPTIONAL: Defines the transport to use for sending emails. Available options: smtp-auth (default) | smtp-api | mailchannels
|
||||||
NEXT_PRIVATE_SMTP_TRANSPORT="smtp-auth"
|
NEXT_PRIVATE_SMTP_TRANSPORT="smtp-auth"
|
||||||
|
|||||||
@ -3,10 +3,22 @@ import { type Page, expect, test as setup } from '@playwright/test';
|
|||||||
import { STORAGE_STATE } from '../../../../playwright.config';
|
import { STORAGE_STATE } from '../../../../playwright.config';
|
||||||
|
|
||||||
setup('authenticate', async ({ page }: { page: Page }) => {
|
setup('authenticate', async ({ page }: { page: Page }) => {
|
||||||
await page.goto('/');
|
await page.goto('/signup');
|
||||||
|
await page.getByLabel('Name').fill(process.env.E2E_TEST_USERNAME);
|
||||||
await page.getByLabel('Email').fill(process.env.E2E_TEST_USER_EMAIL);
|
await page.getByLabel('Email').fill(process.env.E2E_TEST_USER_EMAIL);
|
||||||
await page.getByLabel('Password').fill(process.env.E2E_TEST_USER_PASSWORD);
|
await page.getByLabel('Password').fill(process.env.E2E_TEST_USER_PASSWORD);
|
||||||
await page.getByRole('button', { name: 'Sign In' }).click();
|
|
||||||
|
const canvas = page.locator('canvas');
|
||||||
|
const box = await canvas.boundingBox();
|
||||||
|
|
||||||
|
if (box) {
|
||||||
|
await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2);
|
||||||
|
await page.mouse.down();
|
||||||
|
await page.mouse.move(box.x + box.width / 4, box.y + box.height / 4);
|
||||||
|
await page.mouse.up();
|
||||||
|
}
|
||||||
|
|
||||||
|
await page.getByRole('button', { name: 'Sign Up' }).click();
|
||||||
await page.waitForURL('/documents');
|
await page.waitForURL('/documents');
|
||||||
await expect(page).toHaveURL('/documents');
|
await expect(page).toHaveURL('/documents');
|
||||||
await page.context().storageState({ path: STORAGE_STATE });
|
await page.context().storageState({ path: STORAGE_STATE });
|
||||||
|
|||||||
Reference in New Issue
Block a user