- e2e/reader.spec.js: ein Test-EPUB (e2e/make_epub.py) hochladen, öffnen ohne zu senden, lesen und Lesestand nach Neuladen, Fußnote, Markierung und Notizleiste, Hell/Dunkel samt Reader, alle Tabs ohne Seitenfehler. - e2e/env.js: E2E_PORT und E2E_PYTHON; nie einen laufenden Server wiederverwenden (dahinter läge eine echte Datenbank). - CI: eigener Job e2e (Playwright + Chromium); blockiert den Docker-Build nicht. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
712 B
JavaScript
21 lines
712 B
JavaScript
// Shared constants between playwright.config.js and e2e/global-setup.js.
|
|
// E2E_PORT / E2E_PYTHON: a port that no dev server holds (the suite must never
|
|
// run against a real database), and the Python with the requirements installed.
|
|
const PORT = Number(process.env.E2E_PORT || 8000);
|
|
const BASE_URL = `http://127.0.0.1:${PORT}`;
|
|
const PYTHON = process.env.E2E_PYTHON || 'python3';
|
|
|
|
const SERVER_ENV = {
|
|
...process.env,
|
|
DIORA_DB_NAME: 'e2e_test.sqlite3',
|
|
SECRET_KEY: 'e2e-test-secret-key',
|
|
DEBUG: 'True',
|
|
ALLOWED_HOSTS: 'localhost 127.0.0.1',
|
|
};
|
|
|
|
const TEST_USER = {
|
|
username: 'e2e_test_user',
|
|
password: 'e2e-test-pw-12345',
|
|
};
|
|
|
|
module.exports = { PORT, BASE_URL, PYTHON, SERVER_ENV, TEST_USER };
|