Saving more code clean up and removal
This commit is contained in:
@@ -117,7 +117,7 @@ Built on the Events object.
|
|||||||
Developer sandbox pages — not for production use.
|
Developer sandbox pages — not for production use.
|
||||||
|
|
||||||
- `/testing/ae_obj_field_editor/` — V3 field editor playground
|
- `/testing/ae_obj_field_editor/` — V3 field editor playground
|
||||||
- `/testing/data_store_v3/` — Data store V3 playground
|
- `/testing/data_store/` — Data store V3 playground
|
||||||
- `/testing/editor_test/` — CodeMirror / TipTap editor tests
|
- `/testing/editor_test/` — CodeMirror / TipTap editor tests
|
||||||
- `/testing/hosted_files/` — File upload tests
|
- `/testing/hosted_files/` — File upload tests
|
||||||
|
|
||||||
|
|||||||
@@ -575,7 +575,6 @@ This document provides a reference for the data structures of the core Aether AP
|
|||||||
- `orders_info`: `Optional[dict]`
|
- `orders_info`: `Optional[dict]`
|
||||||
- `order_list`: `Optional[list]`
|
- `order_list`: `Optional[list]`
|
||||||
- `order_cart`: `Optional[dict]`
|
- `order_cart`: `Optional[dict]`
|
||||||
- `order_cart_v3`: `Optional[dict]`
|
|
||||||
- `organization`: `Optional[Union[Organization_Base, None]]`
|
- `organization`: `Optional[Union[Organization_Base, None]]`
|
||||||
- `post_list`: `Optional[list]`
|
- `post_list`: `Optional[list]`
|
||||||
- `user`: `Optional[Union[User_Base, None]]`
|
- `user`: `Optional[Union[User_Base, None]]`
|
||||||
|
|||||||
@@ -728,7 +728,7 @@ All API mock responses in tests need these fields.
|
|||||||
|
|
||||||
**Badge GET endpoint (single object):** `/v3/crud/event_badge/{id}` (NOT nested under event). Matches `api.get_ae_obj()` which uses the flat path.
|
**Badge GET endpoint (single object):** `/v3/crud/event_badge/{id}` (NOT nested under event). Matches `api.get_ae_obj()` which uses the flat path.
|
||||||
|
|
||||||
**Badge PATCH endpoint (update):** `/v3/crud/event/${event_id}/event_badge/${badge_id}` (nested under event). Matches `api.patch_ae_obj_v3()` which uses the nested path.
|
**Badge PATCH endpoint (update):** `/v3/crud/event/${event_id}/event_badge/${badge_id}` (nested under event). Matches `api.patch_ae_obj()` which uses the nested path.
|
||||||
|
|
||||||
**Use `data-testid` for test selectors.** Key buttons have targets: `badge-edit-btn`, `badge-save-btn`, `badge-cancel-btn`, `badge-print-btn`, `badge-professional-title-input`.
|
**Use `data-testid` for test selectors.** Key buttons have targets: `badge-edit-btn`, `badge-save-btn`, `badge-cancel-btn`, `badge-print-btn`, `badge-professional-title-input`.
|
||||||
|
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
## 1. Project Overview
|
## 1. Project Overview
|
||||||
This document outlines the modernization of the Journals module UI in the SvelteKit frontend (`aether_app_sveltekit`). The primary goals are to fully leverage the generic V3 API architecture and introduce high-velocity productivity features for journal management.
|
This document outlines the modernization of the Journals module UI in the SvelteKit frontend (`aether_app_sveltekit`). The primary goals are to fully leverage the generic V3 API architecture and introduce high-velocity productivity features for journal management.
|
||||||
|
|
||||||
**Context:** The backend transition to the generic `api_crud_v3` router is complete. Custom legacy routers have been removed. The frontend must now fully align with this pattern and provide a frictionless user experience.
|
**Context:** The backend transition to the generic `api_crud` router is complete. Custom legacy routers have been removed. The frontend must now fully align with this pattern and provide a frictionless user experience.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 2. Core Objectives
|
## 2. Core Objectives
|
||||||
|
|
||||||
### 🎯 Primary Goals
|
### 🎯 Primary Goals
|
||||||
1. **V3 API Verification:** Ensure all CRUD operations utilize the generic `api_crud_v3` endpoints (Verified).
|
1. **V3 API Verification:** Ensure all CRUD operations utilize the generic `api_crud` endpoints (Verified).
|
||||||
2. **Quick Add UI:** Implement a specialized interface for rapid, friction-free entry creation.
|
2. **Quick Add UI:** Implement a specialized interface for rapid, friction-free entry creation.
|
||||||
3. **Append/Prepend UI:** Allow users to quickly add text to the beginning or end of existing entries without full edit mode.
|
3. **Append/Prepend UI:** Allow users to quickly add text to the beginning or end of existing entries without full edit mode.
|
||||||
4. **Interop & Portability:** Robust import/export logic for Markdown/HTML (Nextcloud Notes compatibility).
|
4. **Interop & Portability:** Robust import/export logic for Markdown/HTML (Nextcloud Notes compatibility).
|
||||||
@@ -25,7 +25,7 @@ This document outlines the modernization of the Journals module UI in the Svelte
|
|||||||
## 3. Technical Architecture
|
## 3. Technical Architecture
|
||||||
|
|
||||||
### Backend (Completed)
|
### Backend (Completed)
|
||||||
* **Router:** `api_crud_v3` (Generic)
|
* **Router:** `api_crud` (Generic)
|
||||||
* **Definitions:** `app/ae_obj_types_def.py` -> `app/object_definitions/journals.py`
|
* **Definitions:** `app/ae_obj_types_def.py` -> `app/object_definitions/journals.py`
|
||||||
* **Endpoints:** `/v3/crud/journal/...` and `/v3/crud/journal_entry/...`
|
* **Endpoints:** `/v3/crud/journal/...` and `/v3/crud/journal_entry/...`
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,88 @@ const ae_promises: key_val = {};
|
|||||||
* --- SITE CRUD ---
|
* --- SITE CRUD ---
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Legacy version
|
||||||
|
// export async function lookup_site_domain({
|
||||||
|
// api_cfg,
|
||||||
|
// fqdn,
|
||||||
|
// view = 'default',
|
||||||
|
// log_lvl = 0
|
||||||
|
// }: {
|
||||||
|
// api_cfg: any;
|
||||||
|
// fqdn: string;
|
||||||
|
// view?: string;
|
||||||
|
// log_lvl?: number;
|
||||||
|
// }): Promise<ae_SiteDomain | null> {
|
||||||
|
// if (log_lvl) {
|
||||||
|
// console.log(`*** lookup_site_domain() *** fqdn=${fqdn}`);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// try {
|
||||||
|
// // We use get_ae_obj_id_crud because we are looking up by a unique field (fqdn) rather than ID.
|
||||||
|
// // This is the older method that uses the /crud/site/domain/:id endpoint.
|
||||||
|
// const result = await api.get_ae_obj_id_crud({
|
||||||
|
// api_cfg,
|
||||||
|
// no_account_id: true,
|
||||||
|
// obj_type: 'site_domain',
|
||||||
|
// obj_id: fqdn,
|
||||||
|
// use_alt_table: true,
|
||||||
|
// use_alt_base: true,
|
||||||
|
// log_lvl
|
||||||
|
// });
|
||||||
|
|
||||||
|
// if (result) {
|
||||||
|
// // Standardize and save to cache
|
||||||
|
// const processed_obj_li = await process_ae_obj__site_domain_props({
|
||||||
|
// obj_li: [result],
|
||||||
|
// log_lvl
|
||||||
|
// });
|
||||||
|
// await db_save_ae_obj_li__ae_obj({
|
||||||
|
// db_instance: db_core,
|
||||||
|
// table_name: 'site_domain',
|
||||||
|
// obj_li: processed_obj_li,
|
||||||
|
// properties_to_save: properties_to_save__site_domain,
|
||||||
|
// log_lvl
|
||||||
|
// });
|
||||||
|
// return result;
|
||||||
|
// }
|
||||||
|
// } catch (error: any) {
|
||||||
|
// console.log('Site domain lookup failed (API Error).', error);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (log_lvl) console.log('Attempting to load site domain from local cache...');
|
||||||
|
// const cached = await db_core.site_domain.where('fqdn').equals(fqdn).first();
|
||||||
|
|
||||||
|
// if (cached) {
|
||||||
|
// return cached as any;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // CRITICAL FALLBACK: If both API and Cache fail, return a "Ghost" site domain object
|
||||||
|
// // to prevent the 403 error from blocking the UI. Page components will handle empty data.
|
||||||
|
// console.error('AE_SITE_CRITICAL: Site domain lookup failed API and CACHE. Returning ghost object.');
|
||||||
|
// return {
|
||||||
|
// id: 'ghost',
|
||||||
|
// id_random: 'ghost',
|
||||||
|
// site_domain_id: 'ghost',
|
||||||
|
// site_domain_id_random: 'ghost',
|
||||||
|
// site_id: 'ghost',
|
||||||
|
// site_id_random: 'ghost',
|
||||||
|
// account_id: 'ghost',
|
||||||
|
// account_id_random: 'ghost',
|
||||||
|
// account_code: 'ghost',
|
||||||
|
// account_name: 'Ghost Account (Offline)',
|
||||||
|
// fqdn: fqdn,
|
||||||
|
// enable: '1',
|
||||||
|
// header_image_path: '',
|
||||||
|
// style_href: '',
|
||||||
|
// google_tracking_id: '',
|
||||||
|
// access_code_kv_json: {},
|
||||||
|
// cfg_json: {},
|
||||||
|
// access_key: '',
|
||||||
|
// site_domain_access_key: ''
|
||||||
|
// } as any;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Updated 2026-01-26 (Cache-First Optimization)
|
||||||
export async function lookup_site_domain({
|
export async function lookup_site_domain({
|
||||||
api_cfg,
|
api_cfg,
|
||||||
fqdn,
|
fqdn,
|
||||||
@@ -23,88 +105,7 @@ export async function lookup_site_domain({
|
|||||||
log_lvl?: number;
|
log_lvl?: number;
|
||||||
}): Promise<ae_SiteDomain | null> {
|
}): Promise<ae_SiteDomain | null> {
|
||||||
if (log_lvl) {
|
if (log_lvl) {
|
||||||
console.log(`*** lookup_site_domain() *** fqdn=${fqdn}`);
|
console.log(`*** lookup_site_domain() *** fqdn=${fqdn} (Cache-First)`);
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
// We use get_ae_obj_id_crud because we are looking up by a unique field (fqdn) rather than ID.
|
|
||||||
// This is the older method that uses the /crud/site/domain/:id endpoint.
|
|
||||||
const result = await api.get_ae_obj_id_crud({
|
|
||||||
api_cfg,
|
|
||||||
no_account_id: true,
|
|
||||||
obj_type: 'site_domain',
|
|
||||||
obj_id: fqdn,
|
|
||||||
use_alt_table: true,
|
|
||||||
use_alt_base: true,
|
|
||||||
log_lvl
|
|
||||||
});
|
|
||||||
|
|
||||||
if (result) {
|
|
||||||
// Standardize and save to cache
|
|
||||||
const processed_obj_li = await process_ae_obj__site_domain_props({
|
|
||||||
obj_li: [result],
|
|
||||||
log_lvl
|
|
||||||
});
|
|
||||||
await db_save_ae_obj_li__ae_obj({
|
|
||||||
db_instance: db_core,
|
|
||||||
table_name: 'site_domain',
|
|
||||||
obj_li: processed_obj_li,
|
|
||||||
properties_to_save: properties_to_save__site_domain,
|
|
||||||
log_lvl
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
} catch (error: any) {
|
|
||||||
console.log('Site domain lookup failed (API Error).', error);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (log_lvl) console.log('Attempting to load site domain from local cache...');
|
|
||||||
const cached = await db_core.site_domain.where('fqdn').equals(fqdn).first();
|
|
||||||
|
|
||||||
if (cached) {
|
|
||||||
return cached as any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// CRITICAL FALLBACK: If both API and Cache fail, return a "Ghost" site domain object
|
|
||||||
// to prevent the 403 error from blocking the UI. Page components will handle empty data.
|
|
||||||
console.error('AE_SITE_CRITICAL: Site domain lookup failed API and CACHE. Returning ghost object.');
|
|
||||||
return {
|
|
||||||
id: 'ghost',
|
|
||||||
id_random: 'ghost',
|
|
||||||
site_domain_id: 'ghost',
|
|
||||||
site_domain_id_random: 'ghost',
|
|
||||||
site_id: 'ghost',
|
|
||||||
site_id_random: 'ghost',
|
|
||||||
account_id: 'ghost',
|
|
||||||
account_id_random: 'ghost',
|
|
||||||
account_code: 'ghost',
|
|
||||||
account_name: 'Ghost Account (Offline)',
|
|
||||||
fqdn: fqdn,
|
|
||||||
enable: '1',
|
|
||||||
header_image_path: '',
|
|
||||||
style_href: '',
|
|
||||||
google_tracking_id: '',
|
|
||||||
access_code_kv_json: {},
|
|
||||||
cfg_json: {},
|
|
||||||
access_key: '',
|
|
||||||
site_domain_access_key: ''
|
|
||||||
} as any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Updated 2026-01-26 (Cache-First Optimization)
|
|
||||||
export async function lookup_site_domain_v3({
|
|
||||||
api_cfg,
|
|
||||||
fqdn,
|
|
||||||
view = 'default',
|
|
||||||
log_lvl = 0
|
|
||||||
}: {
|
|
||||||
api_cfg: any;
|
|
||||||
fqdn: string;
|
|
||||||
view?: string;
|
|
||||||
log_lvl?: number;
|
|
||||||
}): Promise<ae_SiteDomain | null> {
|
|
||||||
if (log_lvl) {
|
|
||||||
console.log(`*** lookup_site_domain_v3() *** fqdn=${fqdn} (Cache-First)`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. FAST PATH: Check local cache first
|
// 1. FAST PATH: Check local cache first
|
||||||
@@ -115,7 +116,7 @@ export async function lookup_site_domain_v3({
|
|||||||
if (log_lvl) console.log('BOOTSTRAP: Cache hit. Returning cached site domain immediately.');
|
if (log_lvl) console.log('BOOTSTRAP: Cache hit. Returning cached site domain immediately.');
|
||||||
|
|
||||||
// Trigger background refresh to keep cache fresh, but don't await it
|
// Trigger background refresh to keep cache fresh, but don't await it
|
||||||
_refresh_site_domain_v3_background({ api_cfg, fqdn, view, log_lvl: 0 });
|
_refresh_site_domain_background({ api_cfg, fqdn, view, log_lvl: 0 });
|
||||||
|
|
||||||
return cached as any;
|
return cached as any;
|
||||||
}
|
}
|
||||||
@@ -124,13 +125,13 @@ export async function lookup_site_domain_v3({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. SLOW PATH: Wait for API if cache is empty
|
// 2. SLOW PATH: Wait for API if cache is empty
|
||||||
return await _refresh_site_domain_v3_background({ api_cfg, fqdn, view, log_lvl });
|
return await _refresh_site_domain_background({ api_cfg, fqdn, view, log_lvl });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal helper to perform the actual API fetch and cache update
|
* Internal helper to perform the actual API fetch and cache update
|
||||||
*/
|
*/
|
||||||
async function _refresh_site_domain_v3_background({ api_cfg, fqdn, view, log_lvl }: any) {
|
async function _refresh_site_domain_background({ api_cfg, fqdn, view, log_lvl }: any) {
|
||||||
try {
|
try {
|
||||||
const guest_api_cfg = { ...api_cfg };
|
const guest_api_cfg = { ...api_cfg };
|
||||||
guest_api_cfg.headers = { ...api_cfg.headers };
|
guest_api_cfg.headers = { ...api_cfg.headers };
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export async function load_ae_obj_id__event({
|
|||||||
if (log_lvl) console.log('EVENT LOAD: Cache hit. Returning stale data immediately.');
|
if (log_lvl) console.log('EVENT LOAD: Cache hit. Returning stale data immediately.');
|
||||||
|
|
||||||
// Trigger background refresh
|
// Trigger background refresh
|
||||||
_refresh_event_v3_background({
|
_refresh_event_background({
|
||||||
api_cfg, event_id, view, try_cache,
|
api_cfg, event_id, view, try_cache,
|
||||||
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_presentation_li, inc_presenter_li, inc_template_li,
|
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_presentation_li, inc_presenter_li, inc_template_li,
|
||||||
enabled, hidden,
|
enabled, hidden,
|
||||||
@@ -79,7 +79,7 @@ export async function load_ae_obj_id__event({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. SLOW PATH: Wait for API if cache is empty or try_cache is false
|
// 2. SLOW PATH: Wait for API if cache is empty or try_cache is false
|
||||||
return await _refresh_event_v3_background({
|
return await _refresh_event_background({
|
||||||
api_cfg, event_id, view, try_cache,
|
api_cfg, event_id, view, try_cache,
|
||||||
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_presentation_li, inc_presenter_li, inc_template_li,
|
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_presentation_li, inc_presenter_li, inc_template_li,
|
||||||
enabled, hidden,
|
enabled, hidden,
|
||||||
@@ -90,7 +90,7 @@ export async function load_ae_obj_id__event({
|
|||||||
/**
|
/**
|
||||||
* Internal helper to perform the actual API fetch and cache update for events
|
* Internal helper to perform the actual API fetch and cache update for events
|
||||||
*/
|
*/
|
||||||
async function _refresh_event_v3_background({
|
async function _refresh_event_background({
|
||||||
api_cfg, event_id, view, try_cache,
|
api_cfg, event_id, view, try_cache,
|
||||||
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_presentation_li, inc_presenter_li, inc_template_li,
|
inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_presentation_li, inc_presenter_li, inc_template_li,
|
||||||
enabled, hidden,
|
enabled, hidden,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
/**
|
/**
|
||||||
* src/lib/elements/element_qr_scanner_v3.svelte
|
* src/lib/elements/element_qr_scanner.svelte
|
||||||
* QR Scanner v3 — Svelte 5 runes, auto-starts, no manual permission step.
|
* QR Scanner v3 — Svelte 5 runes, auto-starts, no manual permission step.
|
||||||
*
|
*
|
||||||
* html5-qrcode's .start() handles camera permission internally.
|
* html5-qrcode's .start() handles camera permission internally.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
/**
|
/**
|
||||||
* element_websocket_v3.svelte — Aether WebSocket V3 Client
|
* element_websocket.svelte — Aether WebSocket V3 Client
|
||||||
*
|
*
|
||||||
* PURPOSE:
|
* PURPOSE:
|
||||||
* Drop-in replacement for element_websocket_v2.svelte using the V3 protocol:
|
* Drop-in replacement for element_websocket_v2.svelte using the V3 protocol:
|
||||||
@@ -303,7 +303,7 @@
|
|||||||
<!-- Debug panel — only visible when ws_connect=true and hide__ws_element=false -->
|
<!-- Debug panel — only visible when ws_connect=true and hide__ws_element=false -->
|
||||||
<section
|
<section
|
||||||
class:hidden={!ws_connect || hide__ws_element}
|
class:hidden={!ws_connect || hide__ws_element}
|
||||||
class="ae_element__websocket_v3 container p-1 bg-pink-100 text-xs mx-auto pb-16 mt-32 mb-32 relative"
|
class="ae_element__websocket container p-1 bg-pink-100 text-xs mx-auto pb-16 mt-32 mb-32 relative"
|
||||||
>
|
>
|
||||||
<span class="absolute top-0 right-0 flex flex-col gap-1">
|
<span class="absolute top-0 right-0 flex flex-col gap-1">
|
||||||
<button
|
<button
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
// console.log(`ae_root +layout.ts: start`);
|
// console.log(`ae_root +layout.ts: start`);
|
||||||
|
|
||||||
// import { error } from '@sveltejs/kit';
|
// import { error } from '@sveltejs/kit';
|
||||||
import { lookup_site_domain_v3 } from '$lib/ae_core/ae_core__site';
|
import { lookup_site_domain } from '$lib/ae_core/ae_core__site';
|
||||||
import type { key_val } from '$lib/stores/ae_stores';
|
import type { key_val } from '$lib/stores/ae_stores';
|
||||||
// import type { ae_SiteDomain } from '$lib/types/ae_types';
|
// import type { ae_SiteDomain } from '$lib/types/ae_types';
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ export async function load({ fetch, params, parent, route, url }) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
result = await lookup_site_domain_v3({
|
result = await lookup_site_domain({
|
||||||
api_cfg: bootstrap_api_cfg,
|
api_cfg: bootstrap_api_cfg,
|
||||||
fqdn,
|
fqdn,
|
||||||
view: 'base',
|
view: 'base',
|
||||||
@@ -234,7 +234,7 @@ export async function load({ fetch, params, parent, route, url }) {
|
|||||||
} else {
|
} else {
|
||||||
// We have a result (cache or native), fire off the refresh in the background to update Dexie
|
// We have a result (cache or native), fire off the refresh in the background to update Dexie
|
||||||
if (log_lvl) console.log('ROOT LOAD: Result already obtained. Background refresh triggered.');
|
if (log_lvl) console.log('ROOT LOAD: Result already obtained. Background refresh triggered.');
|
||||||
lookup_site_domain_v3({
|
lookup_site_domain({
|
||||||
api_cfg: ae_api_init,
|
api_cfg: ae_api_init,
|
||||||
fqdn,
|
fqdn,
|
||||||
view: 'base',
|
view: 'base',
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
/**
|
/**
|
||||||
* ae_comp__badge_obj_view_v2.svelte
|
* ae_comp__badge_obj_view_v.svelte
|
||||||
*
|
*
|
||||||
* V2 badge render component — display-only. No inline edit mode.
|
* V3 badge render component — display-only. No inline edit mode.
|
||||||
*
|
*
|
||||||
* Editing is handled entirely by the right-panel controls component
|
* Editing is handled entirely by the right-panel controls component
|
||||||
* (ae_comp__badge_print_controls.svelte). Changes saved there flow
|
* (ae_comp__badge_print_controls.svelte). Changes saved there flow
|
||||||
* back via liveQuery (IDB → reactive UI update) automatically.
|
* back via liveQuery (IDB → reactive UI update) automatically.
|
||||||
*
|
*
|
||||||
* Differences from v1 (ae_comp__badge_obj_view.svelte):
|
* Differences from v1/v2 (ae_comp__badge_obj_view.svelte):
|
||||||
* - No inline edit mode — floating Edit/Save/Cancel panel removed
|
* - No inline edit mode — floating Edit/Save/Cancel panel removed
|
||||||
* - No handle_save_changes / handle_cancel_changes / handle_print_badge
|
* - No handle_save_changes / handle_cancel_changes / handle_print_badge
|
||||||
* - Print button lives in ae_comp__badge_print_controls.svelte
|
* - Print button lives in ae_comp__badge_print_controls.svelte
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
event_badge_id: string;
|
event_badge_id: string;
|
||||||
lq__event_badge_obj?: any;
|
lq__event_badge_obj?: any;
|
||||||
lq__event_badge_template_obj?: any;
|
lq__event_badge_template_obj?: any;
|
||||||
/** Kept for API compatibility; unused in v2 (no inline edit mode). */
|
/** Kept for API compatibility; unused in v33 (no inline edit mode). */
|
||||||
is_review_mode?: boolean;
|
is_review_mode?: boolean;
|
||||||
/** Optional px override for name font size. null/undefined → auto-scaling runs. */
|
/** Optional px override for name font size. null/undefined → auto-scaling runs. */
|
||||||
font_size_name?: number | null;
|
font_size_name?: number | null;
|
||||||
@@ -343,13 +343,13 @@
|
|||||||
/* *** END *** Legacy ticket/option state */
|
/* *** END *** Legacy ticket/option state */
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Template debug info: screen-only. Shows layout context and v2 marker. -->
|
<!-- Template debug info: screen-only. Shows layout context and v3 marker. -->
|
||||||
<div class="print:hidden flex items-center justify-center gap-2 text-xs text-gray-400 font-mono mb-1 h-6">
|
<div class="print:hidden flex items-center justify-center gap-2 text-xs text-gray-400 font-mono mb-1 h-6">
|
||||||
<span title="Badge template name">{$lq__event_badge_template_obj?.name ?? '—'}</span>
|
<span title="Badge template name">{$lq__event_badge_template_obj?.name ?? '—'}</span>
|
||||||
<span class="text-gray-300">|</span>
|
<span class="text-gray-300">|</span>
|
||||||
<span title="Layout code">{$lq__event_badge_template_obj?.layout ?? '(no layout)'}</span>
|
<span title="Layout code">{$lq__event_badge_template_obj?.layout ?? '(no layout)'}</span>
|
||||||
<span class="text-gray-300">|</span>
|
<span class="text-gray-300">|</span>
|
||||||
<span class="text-blue-400" title="V2 — auto-scaling text, display-only render">v2</span>
|
<span class="text-blue-400" title="V3 — auto-scaling text, display-only render">v3</span>
|
||||||
{#if $ae_loc.edit_mode}
|
{#if $ae_loc.edit_mode}
|
||||||
<span class="text-gray-300">|</span>
|
<span class="text-gray-300">|</span>
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
import { Library, LoaderCircle, QrCode, RemoveFormatting, Search } from '@lucide/svelte';
|
import { Library, LoaderCircle, QrCode, RemoveFormatting, Search } from '@lucide/svelte';
|
||||||
import { ae_loc, ae_api } from '$lib/stores/ae_stores';
|
import { ae_loc, ae_api } from '$lib/stores/ae_stores';
|
||||||
import { events_loc, events_sess } from '$lib/stores/ae_events_stores';
|
import { events_loc, events_sess } from '$lib/stores/ae_events_stores';
|
||||||
import Element_qr_scanner_v3 from '$lib/elements/element_qr_scanner_v3.svelte';
|
import Element_qr_scanner from '$lib/elements/element_qr_scanner.svelte';
|
||||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||||
|
|
||||||
// ISHLT 2024 badge type codes
|
// ISHLT 2024 badge type codes
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
<div
|
<div
|
||||||
class="w-full max-w-2xl mx-auto p-4 bg-surface-100-900 rounded-lg shadow-lg"
|
class="w-full max-w-2xl mx-auto p-4 bg-surface-100-900 rounded-lg shadow-lg"
|
||||||
>
|
>
|
||||||
<Element_qr_scanner_v3
|
<Element_qr_scanner
|
||||||
bind:start_qr_scanner={$events_sess.badges.qr_scan_start}
|
bind:start_qr_scanner={$events_sess.badges.qr_scan_start}
|
||||||
on_qr_scan_result={handle_qr_scan_result}
|
on_qr_scan_result={handle_qr_scan_result}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
import Launcher_cfg from '../launcher_cfg.svelte';
|
import Launcher_cfg from '../launcher_cfg.svelte';
|
||||||
import Launcher_menu from '../launcher_menu.svelte';
|
import Launcher_menu from '../launcher_menu.svelte';
|
||||||
import Launcher_session_view from '../launcher_session_view.svelte';
|
import Launcher_session_view from '../launcher_session_view.svelte';
|
||||||
import Element_websocket_v3 from '$lib/elements/element_websocket_v3.svelte';
|
import Element_websocket from '$lib/elements/element_websocket.svelte';
|
||||||
|
|
||||||
// *** Set initial variables
|
// *** Set initial variables
|
||||||
// NOTE: Derived from data.account_id (prop) instead of $slct.account_id (store)
|
// NOTE: Derived from data.account_id (prop) instead of $slct.account_id (store)
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
// Generate a stable per-device client ID on first load and persist it.
|
// Generate a stable per-device client ID on first load and persist it.
|
||||||
// events_loc is backed by svelte-persisted-store (localStorage) so this
|
// events_loc is backed by svelte-persisted-store (localStorage) so this
|
||||||
// survives page reloads. Without this, client_id falls back to Date.now()
|
// survives page reloads. Without this, client_id falls back to Date.now()
|
||||||
// inside element_websocket_v3 — a new ID on every reload, which breaks
|
// inside element_websocket — a new ID on every reload, which breaks
|
||||||
// direct-target WS messages and doesn't match V3 Vision ID expectations.
|
// direct-target WS messages and doesn't match V3 Vision ID expectations.
|
||||||
if (!$events_loc.launcher.controller_client_id) {
|
if (!$events_loc.launcher.controller_client_id) {
|
||||||
$events_loc.launcher.controller_client_id = crypto.randomUUID();
|
$events_loc.launcher.controller_client_id = crypto.randomUUID();
|
||||||
@@ -1168,7 +1168,7 @@
|
|||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
{#if $events_loc.launcher.controller_group_code && $events_loc.launcher.ws_connect}
|
{#if $events_loc.launcher.controller_group_code && $events_loc.launcher.ws_connect}
|
||||||
<Element_websocket_v3
|
<Element_websocket
|
||||||
{log_lvl}
|
{log_lvl}
|
||||||
bind:ws_connect={$events_loc.launcher.ws_connect}
|
bind:ws_connect={$events_loc.launcher.ws_connect}
|
||||||
bind:ws_connect_status={$events_sess.launcher.ws_connect_status}
|
bind:ws_connect_status={$events_sess.launcher.ws_connect_status}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
import { ae_api, ae_loc } from '$lib/stores/ae_stores';
|
import { ae_api, ae_loc } from '$lib/stores/ae_stores';
|
||||||
import { events_loc } from '$lib/stores/ae_events_stores';
|
import { events_loc } from '$lib/stores/ae_events_stores';
|
||||||
import { events_func } from '$lib/ae_events/ae_events_functions';
|
import { events_func } from '$lib/ae_events/ae_events_functions';
|
||||||
import Element_qr_scanner_v3 from '$lib/elements/element_qr_scanner_v3.svelte';
|
import Element_qr_scanner from '$lib/elements/element_qr_scanner.svelte';
|
||||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||||
import { Camera, CircleAlert, CircleCheck, Eye, LoaderCircle, RefreshCw, RotateCcw, ShieldOff, X } from '@lucide/svelte';
|
import { Camera, CircleAlert, CircleCheck, Eye, LoaderCircle, RefreshCw, RotateCcw, ShieldOff, X } from '@lucide/svelte';
|
||||||
import { SvelteMap } from 'svelte/reactivity';
|
import { SvelteMap } from 'svelte/reactivity';
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
<div class="lead-qr-scanner flex flex-col items-center space-y-4 w-full min-h-100 justify-center">
|
<div class="lead-qr-scanner flex flex-col items-center space-y-4 w-full min-h-100 justify-center">
|
||||||
{#if scanning_status === 'idle' || scanning_status === 'scanning'}
|
{#if scanning_status === 'idle' || scanning_status === 'scanning'}
|
||||||
<div class="w-full max-w-sm mx-auto aspect-square overflow-hidden rounded-xl border-4 border-surface-500/20 shadow-xl relative bg-surface-900/10">
|
<div class="w-full max-w-sm mx-auto aspect-square overflow-hidden rounded-xl border-4 border-surface-500/20 shadow-xl relative bg-surface-900/10">
|
||||||
<Element_qr_scanner_v3
|
<Element_qr_scanner
|
||||||
bind:start_qr_scanner
|
bind:start_qr_scanner
|
||||||
on_qr_scan_result={handle_qr_scan_result}
|
on_qr_scan_result={handle_qr_scan_result}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
|
||||||
// *** Import Svelte specific
|
// *** Import Svelte specific
|
||||||
// import { onDestroy } from 'svelte';
|
|
||||||
// import { browser } from '$app/environment';
|
|
||||||
// import { fade } from 'svelte/transition';
|
|
||||||
|
|
||||||
// *** Import other supporting libraries
|
// *** Import other supporting libraries
|
||||||
|
|
||||||
@@ -37,32 +34,12 @@
|
|||||||
console.log(`Event Object selected: ${$lq__event_obj}`);
|
console.log(`Event Object selected: ${$lq__event_obj}`);
|
||||||
console.log(`Event Object name: ${$lq__event_obj?.name}`);
|
console.log(`Event Object name: ${$lq__event_obj?.name}`);
|
||||||
|
|
||||||
// $slct_trigger = 'load__event_obj';
|
|
||||||
// $idaa_trig.event_id = $idaa_slct.event_id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// dayjs.extend(window.dayjs_plugin_utc)
|
|
||||||
// dayjs.extend(window.dayjs_plugin_timezone);
|
|
||||||
// console.log(`UTC offset: ${dayjs().utcOffset()}`);
|
|
||||||
// console.log(`TZ offset: ${dayjs().utcOffset('US/Pacific')}`);
|
|
||||||
// // let test_time = dayjs.utc('2024-01-08 11:55').tz('Asia/Taipei');
|
|
||||||
// // let test_time = dayjs.utc('2024-01-08 14:15').tz('America/New_York');
|
|
||||||
// let test_time = dayjs.tz('2024-01-08 14:15', 'US/Pacific');
|
|
||||||
// console.log(test_time.format('YYYY-MM-DD HH:mm'));
|
|
||||||
// let adjusted_to_local_tz = test_time.tz('America/New_York');
|
|
||||||
// console.log(adjusted_to_local_tz.format('YYYY-MM-DD HH:mm'));
|
|
||||||
|
|
||||||
// let adjusted_to_local_tz_v2 = dayjs.tz('2024-01-08 14:15', 'US/Pacific').tz('America/New_York');
|
|
||||||
// console.log(adjusted_to_local_tz_v2);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section
|
<section
|
||||||
class="svelte_component ae_section ae_view event_obj view__event_obj space-y-2"
|
class="svelte_component ae_section ae_view event_obj view__event_obj space-y-2"
|
||||||
>
|
>
|
||||||
<!-- <h2 class="ae_title event__title text-2xl font-bold">
|
|
||||||
<span class="ae_icon fas fa-calendar-day"></span>
|
|
||||||
{$lq__event_obj?.name ? $lq__event_obj?.name : 'Recovery Meeting'}
|
|
||||||
</h2> -->
|
|
||||||
|
|
||||||
<div class="p-2 bg-white shadow-md rounded-lg">
|
<div class="p-2 bg-white shadow-md rounded-lg">
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
import { ArrowRightLeft, Bug, Building2, CircleCheck, Code, Contact, Database, Eye, EyeOff, FlaskConical, Globe, Info, Key, MapPin, RefreshCcw, Satellite, Server, Settings2, ShieldAlert, ShieldCheck, Trash2, Unlock, User, UserCheck, Users, Zap } from '@lucide/svelte';
|
import { ArrowRightLeft, Bug, Building2, CircleCheck, Code, Contact, Database, Eye, EyeOff, FlaskConical, Globe, Info, Key, MapPin, RefreshCcw, Satellite, Server, Settings2, ShieldAlert, ShieldCheck, Trash2, Unlock, User, UserCheck, Users, Zap } from '@lucide/svelte';
|
||||||
// Core Module Imports
|
// Core Module Imports
|
||||||
import { load_ae_obj_li__account } from '$lib/ae_core/ae_core__account';
|
import { load_ae_obj_li__account } from '$lib/ae_core/ae_core__account';
|
||||||
import { lookup_site_domain_v3 } from '$lib/ae_core/ae_core__site';
|
import { lookup_site_domain } from '$lib/ae_core/ae_core__site';
|
||||||
import { load_ae_obj_id__user } from '$lib/ae_core/ae_core__user';
|
import { load_ae_obj_id__user } from '$lib/ae_core/ae_core__user';
|
||||||
import { db_core } from '$lib/ae_core/db_core';
|
import { db_core } from '$lib/ae_core/db_core';
|
||||||
import { events_loc } from '$lib/stores/ae_events_stores';
|
import { events_loc } from '$lib/stores/ae_events_stores';
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
|
|
||||||
const test_site_domain_lookup = () => run_test('Site Domain Lookup', async () => {
|
const test_site_domain_lookup = () => run_test('Site Domain Lookup', async () => {
|
||||||
const fqdn = test_fqdn || window.location.host;
|
const fqdn = test_fqdn || window.location.host;
|
||||||
return await lookup_site_domain_v3({ api_cfg: $ae_api, fqdn, log_lvl: 1 });
|
return await lookup_site_domain({ api_cfg: $ae_api, fqdn, log_lvl: 1 });
|
||||||
});
|
});
|
||||||
|
|
||||||
const test_load_accounts = () => run_test('Load Accounts', async () => {
|
const test_load_accounts = () => run_test('Load Accounts', async () => {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Shared test helpers (`tests/_helpers/`)
|
|||||||
| `env.ts` | Constants: `testing_event_id`, `testing_account_id`, `mock_site_domain` |
|
| `env.ts` | Constants: `testing_event_id`, `testing_account_id`, `mock_site_domain` |
|
||||||
| `ae_defaults.ts` | `ae_app_local_data_defaults` — full localStorage seed object with `__version` |
|
| `ae_defaults.ts` | `ae_app_local_data_defaults` — full localStorage seed object with `__version` |
|
||||||
| `idb_helpers.ts` | `inject_badge_and_template()` — write badge + template records into IndexedDB |
|
| `idb_helpers.ts` | `inject_badge_and_template()` — write badge + template records into IndexedDB |
|
||||||
| `minimal_v3_mocks.ts` | `attach_minimal_v3_routes()`, `seed_trusted_session()`, `setup_badge_test_page()` |
|
| `minimal_ae_api_mocks.ts` | `attach_minimal_routes()`, `seed_trusted_session()`, `setup_badge_test_page()` |
|
||||||
|
|
||||||
**`setup_badge_test_page(page, event_id)`** is the one-call `beforeEach` for any badge/event print page test. It wires the pageerror listener, all V3 API mocks, and the trusted auth localStorage seed in one call.
|
**`setup_badge_test_page(page, event_id)`** is the one-call `beforeEach` for any badge/event print page test. It wires the pageerror listener, all V3 API mocks, and the trusted auth localStorage seed in one call.
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ Writing / modifying tests
|
|||||||
```ts
|
```ts
|
||||||
import { testing_event_id } from './_helpers/env';
|
import { testing_event_id } from './_helpers/env';
|
||||||
import { inject_badge_and_template } from './_helpers/idb_helpers'; // only if IDB needed
|
import { inject_badge_and_template } from './_helpers/idb_helpers'; // only if IDB needed
|
||||||
import { setup_badge_test_page } from './_helpers/minimal_v3_mocks';
|
import { setup_badge_test_page } from './_helpers/minimal_ae_api_mocks';
|
||||||
|
|
||||||
const event_id = testing_event_id;
|
const event_id = testing_event_id;
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ test.beforeEach(async ({ page }) => {
|
|||||||
```
|
```
|
||||||
|
|
||||||
- If you need IDB data (badge, template), use the inject-then-reload pattern (see Hard-Won Lessons below).
|
- If you need IDB data (badge, template), use the inject-then-reload pattern (see Hard-Won Lessons below).
|
||||||
- Use `page.route('**/v3/**', handler)` to mock backend responses. `attach_minimal_v3_routes` covers the common cases; add inline `page.route()` calls only for test-specific overrides.
|
- Use `page.route('**/v3/**', handler)` to mock backend responses. `attach_minimal_routes` covers the common cases; add inline `page.route()` calls only for test-specific overrides.
|
||||||
|
|
||||||
Adding new tests
|
Adding new tests
|
||||||
- Create a new file `tests/my_feature.test.ts`.
|
- Create a new file `tests/my_feature.test.ts`.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const testing_person_id = 'QWODAPCNLQU'; // (49) "Osiris Idem"
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Mock site_domain object for Playwright tests.
|
* Mock site_domain object for Playwright tests.
|
||||||
* Matches the structure expected by +layout.ts lookup_site_domain_v3()
|
* Matches the structure expected by +layout.ts lookup_site_domain()
|
||||||
*/
|
*/
|
||||||
export const mock_site_domain = {
|
export const mock_site_domain = {
|
||||||
id: testing_site_domain_id,
|
id: testing_site_domain_id,
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export const minimal_badge = (overrides: Record<string, any> = {}) => ({
|
|||||||
* - Responds to event GET, badge search/create/update/delete, and a simple site_domain/search.
|
* - Responds to event GET, badge search/create/update/delete, and a simple site_domain/search.
|
||||||
* - Keeps created badge state in-memory for the page session.
|
* - Keeps created badge state in-memory for the page session.
|
||||||
*/
|
*/
|
||||||
export async function attach_minimal_v3_routes(page: Page, event_id: string) {
|
export async function attach_minimal_routes(page: Page, event_id: string) {
|
||||||
let created_badge: any = null;
|
let created_badge: any = null;
|
||||||
|
|
||||||
await page.route('**/v3/**', async (route) => {
|
await page.route('**/v3/**', async (route) => {
|
||||||
@@ -112,13 +112,13 @@ export async function seed_trusted_session(
|
|||||||
*
|
*
|
||||||
* Wires:
|
* Wires:
|
||||||
* - page.on('pageerror') → stderr
|
* - page.on('pageerror') → stderr
|
||||||
* - attach_minimal_v3_routes() — mock all /v3/ API calls
|
* - attach_minimal_routes() — mock all /v3/ API calls
|
||||||
* - seed_trusted_session() — seed ae_loc localStorage with trusted auth
|
* - seed_trusted_session() — seed ae_loc localStorage with trusted auth
|
||||||
*/
|
*/
|
||||||
export async function setup_badge_test_page(page: Page, event_id: string): Promise<void> {
|
export async function setup_badge_test_page(page: Page, event_id: string): Promise<void> {
|
||||||
page.on('pageerror', (err) => console.error(`BROWSER ERROR: ${err.message}`));
|
page.on('pageerror', (err) => console.error(`BROWSER ERROR: ${err.message}`));
|
||||||
await attach_minimal_v3_routes(page, event_id);
|
await attach_minimal_routes(page, event_id);
|
||||||
await seed_trusted_session(page, event_id);
|
await seed_trusted_session(page, event_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { minimal_event, minimal_badge, attach_minimal_v3_routes, seed_trusted_session, setup_badge_test_page };
|
export default { minimal_event, minimal_badge, attach_minimal_routes, seed_trusted_session, setup_badge_test_page };
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { testing_event_id } from './_helpers/env';
|
import { testing_event_id } from './_helpers/env';
|
||||||
import { inject_badge_and_template } from './_helpers/idb_helpers';
|
import { inject_badge_and_template } from './_helpers/idb_helpers';
|
||||||
import { setup_badge_test_page } from './_helpers/minimal_v3_mocks';
|
import { setup_badge_test_page } from './_helpers/minimal_ae_api_mocks';
|
||||||
|
|
||||||
const event_id = testing_event_id;
|
const event_id = testing_event_id;
|
||||||
const badge_id = 'UIJT-73-63-61';
|
const badge_id = 'UIJT-73-63-61';
|
||||||
@@ -56,7 +56,7 @@ const mock_template = {
|
|||||||
test.describe('Badge Print Page — attendee print workflow', () => {
|
test.describe('Badge Print Page — attendee print workflow', () => {
|
||||||
test.beforeEach(async ({ page }) => {
|
test.beforeEach(async ({ page }) => {
|
||||||
await setup_badge_test_page(page, event_id);
|
await setup_badge_test_page(page, event_id);
|
||||||
// attach_minimal_v3_routes (inside setup_badge_test_page) already handles
|
// attach_minimal_routes (inside setup_badge_test_page) already handles
|
||||||
// badge PATCH — returns { data: null } but tests only inspect the request body.
|
// badge PATCH — returns { data: null } but tests only inspect the request body.
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { testing_event_id } from './_helpers/env';
|
import { testing_event_id } from './_helpers/env';
|
||||||
import { inject_badge_and_template } from './_helpers/idb_helpers';
|
import { inject_badge_and_template } from './_helpers/idb_helpers';
|
||||||
import { setup_badge_test_page } from './_helpers/minimal_v3_mocks';
|
import { setup_badge_test_page } from './_helpers/minimal_ae_api_mocks';
|
||||||
|
|
||||||
const event_id = testing_event_id;
|
const event_id = testing_event_id;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { testing_event_id } from './_helpers/env';
|
import { testing_event_id } from './_helpers/env';
|
||||||
import { inject_badge_and_template } from './_helpers/idb_helpers';
|
import { inject_badge_and_template } from './_helpers/idb_helpers';
|
||||||
import { setup_badge_test_page } from './_helpers/minimal_v3_mocks';
|
import { setup_badge_test_page } from './_helpers/minimal_ae_api_mocks';
|
||||||
|
|
||||||
const event_id = testing_event_id;
|
const event_id = testing_event_id;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { testing_event_id } from './_helpers/env';
|
import { testing_event_id } from './_helpers/env';
|
||||||
import { setup_badge_test_page } from './_helpers/minimal_v3_mocks';
|
import { setup_badge_test_page } from './_helpers/minimal_ae_api_mocks';
|
||||||
|
|
||||||
const event_id = testing_event_id;
|
const event_id = testing_event_id;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
import { ae_app_local_data_defaults } from './_helpers/ae_defaults';
|
import { ae_app_local_data_defaults } from './_helpers/ae_defaults';
|
||||||
import { testing_event_id, testing_account_id } from './_helpers/env';
|
import { testing_event_id, testing_account_id } from './_helpers/env';
|
||||||
import { attach_minimal_v3_routes } from './_helpers/minimal_v3_mocks';
|
import { attach_minimal_routes } from './_helpers/minimal_ae_api_mocks';
|
||||||
|
|
||||||
const event_id = testing_event_id;
|
const event_id = testing_event_id;
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ test.describe('Event Presenter Page - smoke', () => {
|
|||||||
if (msg.type() === 'error' || msg.type() === 'warning') console.error(`BROWSER [${msg.type().toUpperCase()}]: ${msg.text()}`);
|
if (msg.type() === 'error' || msg.type() === 'warning') console.error(`BROWSER [${msg.type().toUpperCase()}]: ${msg.text()}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
await attach_minimal_v3_routes(page, event_id);
|
await attach_minimal_routes(page, event_id);
|
||||||
|
|
||||||
await page.addInitScript(([defaults, event_id, account_id]) => {
|
await page.addInitScript(([defaults, event_id, account_id]) => {
|
||||||
const test_data = { ...defaults, account_id: account_id, manager_access: true } as any;
|
const test_data = { ...defaults, account_id: account_id, manager_access: true } as any;
|
||||||
|
|||||||
Reference in New Issue
Block a user