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:
@@ -4,14 +4,46 @@
|
||||
*/
|
||||
export const test_base_url = 'http://demo.localhost:5173';
|
||||
export const dev_api_base = 'https://dev-api.oneskyit.com';
|
||||
export const testing_account_id = '_XY7DXtc9MY';
|
||||
export const testing_event_id = 'pjrcghqwert';
|
||||
|
||||
// Core test/demo IDs (from tests/README.md)
|
||||
export const testing_account_id = '_XY7DXtc9MY'; // (1) "One Sky IT Demo"
|
||||
export const testing_site_id = '92vkYC4fVEl'; // (12) "One Sky IT Demo"
|
||||
export const testing_site_domain_id = '_6jcTbnJk-o'; // (12) "demo.localhost:5173"
|
||||
export const testing_fqdn = 'demo.localhost:5173';
|
||||
|
||||
// Events test/demo IDs
|
||||
export const testing_event_id = 'pjrcghqwert'; // (1) "Demo One Sky IT Conference"
|
||||
export const testing_person_id = 'QWODAPCNLQU'; // (49) "Osiris Idem"
|
||||
|
||||
/**
|
||||
* Mock site_domain object for Playwright tests.
|
||||
* Matches the structure expected by +layout.ts lookup_site_domain_v3()
|
||||
*/
|
||||
export const mock_site_domain = {
|
||||
id: testing_site_domain_id,
|
||||
site_id: testing_site_id,
|
||||
site_domain_id: testing_site_domain_id,
|
||||
account_id: testing_account_id,
|
||||
account_id_random: testing_account_id,
|
||||
account_code: 'OSIT_DEMO',
|
||||
account_name: 'One Sky IT Demo',
|
||||
fqdn: testing_fqdn,
|
||||
enable: '1',
|
||||
cfg_json: {},
|
||||
style_href: '',
|
||||
header_image_path: ''
|
||||
};
|
||||
|
||||
export const TEST_ENV = {
|
||||
test_base_url,
|
||||
dev_api_base,
|
||||
testing_account_id,
|
||||
testing_event_id
|
||||
testing_site_id,
|
||||
testing_site_domain_id,
|
||||
testing_fqdn,
|
||||
testing_event_id,
|
||||
testing_person_id,
|
||||
mock_site_domain
|
||||
};
|
||||
|
||||
export default TEST_ENV;
|
||||
|
||||
Reference in New Issue
Block a user