Root cause fix: tests/_helpers/ae_defaults.ts was missing __version: 1, causing store_versions.ts to wipe ae_loc from localStorage on every test page load. This made trusted_access fall back to false, hiding the print button (can_print guard) and failing all attendee workflow tests. Changes: - ae_defaults.ts: add __version: 1 with comment explaining the store_versions guard - idb_helpers.ts: extract inject_badge_and_template() from print layout test into shared helper; now used by all three print/render test files - event_badge_render.test.ts: new — 4 tests covering full_name_override priority, full_name fallback, duplex=0 hides badge back, duplex=1 shows badge back - event_badge_attendee_workflow.test.ts: cleaned up (diagnostic code removed); all 3 tests now pass - event_badge_print_layout.test.ts: renamed from badge_print_layout.test.ts; inline inject_idb() replaced with shared idb_helpers import - event_badge_smoke.test.ts: renamed from event_badge.test.ts - playwright.config.ts: use system /usr/bin/chromium on Arch Linux (avoids Playwright's bundled Chromium which requires Ubuntu libs not present on Arch) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
153 lines
4.4 KiB
TypeScript
153 lines
4.4 KiB
TypeScript
export const ae_app_local_data_defaults = {
|
|
__version: 1, // Must match AE_LOC_VERSION in src/lib/stores/store_versions.ts — store_versions.ts wipes ae_loc if version doesn't match
|
|
last_page_reload: null,
|
|
last_cache_refresh: Date.now(),
|
|
cache_expired: false,
|
|
ver: '2025-05-01_1445',
|
|
ver_idb: '2025-05-01_1445',
|
|
name: 'Aether - App Hub (SvelteKit 2.x Svelte 4.x)',
|
|
theme: 'light',
|
|
theme_mode: 'light',
|
|
theme_name: 'nouveau',
|
|
iframe: false,
|
|
browser_type: null,
|
|
title: `OSIT's Æ`,
|
|
debug_mode: false,
|
|
edit_mode: false,
|
|
adv_mode: false,
|
|
sync_local_config: true,
|
|
account_id: null,
|
|
account_code: 'not_set',
|
|
account_name: 'Account Name Not Set',
|
|
allow_access: true,
|
|
site_domain: null,
|
|
site_access_key: null,
|
|
site_domain_access_key: null,
|
|
site_cfg_json: {
|
|
slct__event_id: null,
|
|
slct__event_badge_template_id: null,
|
|
slct__sponsorship_cfg_id: null,
|
|
header_image_path: null
|
|
},
|
|
site_access_code_kv: {
|
|
administrator: null,
|
|
trusted: null,
|
|
public: 'public1980',
|
|
authenticated: 'auth1980'
|
|
},
|
|
access_type: 'anonymous',
|
|
administrator_access: false,
|
|
trusted_access: false,
|
|
public_access: false,
|
|
authenticated_access: false,
|
|
anonymous_access: true,
|
|
user_email: null,
|
|
user_access_type: null,
|
|
jwt: null,
|
|
person_id: null,
|
|
person: {
|
|
id: null,
|
|
given_name: null,
|
|
full_name: null,
|
|
full_name_override: null,
|
|
primary_email: null,
|
|
user_id: null,
|
|
qry_limit__people: 150,
|
|
show_content__person_page_help: false
|
|
},
|
|
user_id: null,
|
|
user: {
|
|
id: null,
|
|
username: null,
|
|
name: null,
|
|
email: null,
|
|
allow_auth_key: null,
|
|
super: false,
|
|
manager: false,
|
|
administrator: false,
|
|
verified: false,
|
|
public: false,
|
|
person_id: null,
|
|
access_type: null,
|
|
qry_limit__users: 100
|
|
},
|
|
qry__enabled: 'enabled',
|
|
qry__hidden: 'not_hidden',
|
|
qry__limit: 20,
|
|
qry__offset: 0,
|
|
qr_scanner_version: 'one',
|
|
admin: {
|
|
show_element__sql_qry: false,
|
|
show_element__sql_qry_results: false
|
|
},
|
|
sys_menu: {
|
|
hide: false,
|
|
expand: false,
|
|
hide_access_type: false,
|
|
expand_access_type: false,
|
|
hide_edit_mode: false,
|
|
expand_edit_mode: false,
|
|
hide_user: false,
|
|
expand_user: false,
|
|
hide_theme: false,
|
|
expand_theme: false,
|
|
hide_app_cfg: false,
|
|
expand_app_cfg: false
|
|
},
|
|
debug_menu: { hide: false, expand: false },
|
|
app_cfg: {
|
|
show_element__header: false,
|
|
show_element__footer: false,
|
|
show_element__menu: false,
|
|
show_element__menu_btn: true,
|
|
show_element__access_type: true,
|
|
show_element__passcode_input: true,
|
|
show_element__cfg: true,
|
|
show_element__cfg_detail: false,
|
|
show_element__sign_in_out: true,
|
|
show_opt__debug: true,
|
|
show_opt__permissions: true,
|
|
show_opt__reset: true,
|
|
show_opt__sync: true,
|
|
show_opt__theme: true,
|
|
show_opt__utilities: true
|
|
},
|
|
files: { processed_file_kv: {}, uploaded_file_kv: {}, video_clip_file_kv: {}, add_to_use_files_method: 'upload' },
|
|
ds: {},
|
|
hub: {
|
|
show_element__cfg: true,
|
|
show_element__cfg_detail: false,
|
|
show_element__access_type: true,
|
|
theme_mode: 'light',
|
|
theme_name: 'wintry',
|
|
classes__form: 'border border-surface-200 p-4 space-y-4 rounded-container',
|
|
qr: {}
|
|
},
|
|
mod: {
|
|
archives: {},
|
|
events: {
|
|
event_id: null,
|
|
show_edit__event_presenter_obj: false,
|
|
show_list__event_presenter_obj_li: true,
|
|
show_view__event_presenter_obj: false,
|
|
submit_status: null,
|
|
default_session_id: null
|
|
},
|
|
journals: {},
|
|
posts: {},
|
|
sponsorships: {
|
|
cfg_id: 'SPONSORSHIP_CFG_ID',
|
|
for_type: null,
|
|
for_id: null,
|
|
level_guest_max_li: { 0: 0, 1: 4, 2: 8, 3: 8, 4: 8, 5: 8, 6: 16, 7: 16 },
|
|
show_edit__sponsorship_obj: false,
|
|
show_list__sponsorship_obj_li: true,
|
|
show_view__sponsorship_obj: false,
|
|
show_question__accommodations: false,
|
|
submit_status: null
|
|
}
|
|
}
|
|
};
|
|
|
|
export default ae_app_local_data_defaults;
|