Fill e2e gaps: storageState, real upload POST, session smoke
Add auth setup project, viewer session check, upload that posts a fixture, FastAPI login spec (skips without E2E_API_*), and repo ROADMAP.md.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { assertPublicHost, saveStorageState, waitForUrlHost } from '@levkin/playkit';
|
||||
import { test as setup } from '../fixtures';
|
||||
import path from 'node:path';
|
||||
|
||||
const authFile = path.join(__dirname, '../.auth/admin.json');
|
||||
|
||||
setup('authenticate e2e admin', async ({ page, playkitConfig, loginPage, e2eCredentials, timings }) => {
|
||||
setup.skip(!e2eCredentials, 'E2E_ADMIN_EMAIL/PASSWORD required');
|
||||
assertPublicHost(playkitConfig.baseUrl);
|
||||
|
||||
await timings.measure('setup_login', async () => {
|
||||
await loginPage.openLogin();
|
||||
await loginPage.signIn(e2eCredentials!.email, e2eCredentials!.password);
|
||||
await page.waitForURL((url) => !url.pathname.includes('/login'), { timeout: 30_000 });
|
||||
await page.getByLabel('Account menu').waitFor({ state: 'visible', timeout: 30_000 });
|
||||
await waitForUrlHost(page, playkitConfig.expectedHost);
|
||||
});
|
||||
|
||||
await saveStorageState(page, authFile);
|
||||
});
|
||||
Reference in New Issue
Block a user