test: centralize demo IDs and site_domain mock in env.ts
- Added testing_site_id, testing_site_domain_id, testing_fqdn, testing_person_id - Created mock_site_domain object matching +layout.ts expectations - Updated minimal_v3_mocks.ts to use mock_site_domain - Fixes 'Domain Not Registered' overlay in Playwright tests - All test IDs now documented with comments from tests/README.md
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Page } from '@playwright/test';
|
||||
import { mock_site_domain } from './env';
|
||||
|
||||
export const minimal_event = (event_id: string) => ({
|
||||
data: {
|
||||
@@ -36,7 +37,11 @@ export async function attach_minimal_v3_routes(page: Page, event_id: string) {
|
||||
const method = req.method();
|
||||
|
||||
if (url.includes('site_domain/search')) {
|
||||
return route.fulfill({ status: 200, contentType: 'application/json', body: JSON.stringify({ data: [{ id: 'td', site_id: 'ts' }] }) });
|
||||
return route.fulfill({
|
||||
status: 200,
|
||||
contentType: 'application/json',
|
||||
body: JSON.stringify({ data: [mock_site_domain] })
|
||||
});
|
||||
}
|
||||
|
||||
if (url.includes(`/v3/crud/event/${event_id}`) && method === 'GET') {
|
||||
|
||||
Reference in New Issue
Block a user