mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 16:51:38 +10:00
chore: use env vars for tests
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_AUTHENTICATE_USERNAME="Test User"
|
||||||
|
E2E_TEST_AUTHENTICATE_USER_EMAIL="testuser@mail.com"
|
||||||
|
E2E_TEST_AUTHENTICATE_USER_PASSWORD="test_password"
|
||||||
|
|
||||||
# [[STORAGE]]
|
# [[STORAGE]]
|
||||||
# OPTIONAL: Defines the storage transport to use. Available options: database (default) | s3
|
# OPTIONAL: Defines the storage transport to use. Available options: database (default) | s3
|
||||||
NEXT_PUBLIC_UPLOAD_TRANSPORT="database"
|
NEXT_PUBLIC_UPLOAD_TRANSPORT="database"
|
||||||
|
|||||||
3
package-lock.json
generated
3
package-lock.json
generated
@ -20335,7 +20335,8 @@
|
|||||||
"start-server-and-test": "^2.0.1"
|
"start-server-and-test": "^2.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "^1.38.1",
|
"@documenso/web": "*",
|
||||||
|
"@playwright/test": "^1.18.1",
|
||||||
"@types/node": "^20.8.2"
|
"@types/node": "^20.8.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -10,9 +10,9 @@ test.use({ storageState: { cookies: [], origins: [] } });
|
|||||||
*/
|
*/
|
||||||
test.describe.configure({ mode: 'serial' });
|
test.describe.configure({ mode: 'serial' });
|
||||||
|
|
||||||
const username = 'Test user';
|
const username = E2E_TEST_AUTHENTICATE_USERNAME;
|
||||||
const email = 'testuser@gmail.com';
|
const email = E2E_TEST_AUTHENTICATE_USER_EMAIL;
|
||||||
const password = '12345678910';
|
const password = E2E_TEST_AUTHENTICATE_USER_PASSWORD;
|
||||||
|
|
||||||
test('user can sign up with email and password', async ({ page }: { page: Page }) => {
|
test('user can sign up with email and password', async ({ page }: { page: Page }) => {
|
||||||
await page.goto('/signup');
|
await page.goto('/signup');
|
||||||
|
|||||||
@ -72,6 +72,9 @@
|
|||||||
"POSTGRES_URL",
|
"POSTGRES_URL",
|
||||||
"DATABASE_URL",
|
"DATABASE_URL",
|
||||||
"POSTGRES_PRISMA_URL",
|
"POSTGRES_PRISMA_URL",
|
||||||
"POSTGRES_URL_NON_POOLING"
|
"POSTGRES_URL_NON_POOLING",
|
||||||
|
"E2E_TEST_AUTHENTICATE_USERNAME",
|
||||||
|
"E2E_TEST_AUTHENTICATE_USER_EMAIL",
|
||||||
|
"E2E_TEST_AUTHENTICATE_USER_PASSWORD"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user