Files
OSIT-AE-App-Svelte/tests/_helpers/env.ts
2026-03-24 11:15:01 -04:00

50 lines
1.5 KiB
TypeScript

/**
* Centralized test environment constants for Playwright and unit tests.
* Use snake_case names per project preference.
*/
export const test_base_url = 'http://demo.localhost:5173';
export const dev_api_base = 'https://dev-api.oneskyit.com';
// 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()
*/
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_site_id,
testing_site_domain_id,
testing_fqdn,
testing_event_id,
testing_person_id,
mock_site_domain
};
export default TEST_ENV;