Files
OSIT-AE-App-Svelte/tests
Scott Idem 73597cb8b4 chore: svelte-check cleanup — fix Svelte 5 patterns in events/pres_mgmt, badges, launcher, and tests
Source changes (0 errors, 175 warnings after):
- api_post__crud_obj_v3: add backward-compat migration aliases (for_obj_type/id, obj_type/id) to nested CRUD funcs
- ae_events__event_device/presenter/session: make event_id/presentation_id optional; fall back to store value
- element_ae_obj_field_editor_v3: import type Snippet properly; mark current_value as $bindable()
- ae_comp__badge_obj_view: fix $derived(() => false) → $derived(false) for show_receipt/show_tickets
- badge templates: pass explicit event_id param to delete/update calls
- launcher/+page: capture URL params as stable consts; pass event_id to update_ae_obj__event_device
- ae_comp__event_device_obj_li: wrap setInterval in $effect; onDestroy cleanup always registered
- ae_comp__event_device_obj_li_wrapper: move console.log to $effect; fix self-closing tag
- presenter form/menu/view/list: add missing event_presentation_id to all update/delete calls
- reports/locations/presenter/+page: move store assignments into $effect + untrack; ae_acct → $derived
- session/+page: add Comp_event_presenter_form_agree import; cast for type compat
- session_view: wrap <img onclick> in <button> for accessibility/validity
- ae_comp__event_presentation_obj_li: remove unneeded event_id/session_id from create_ae_obj__event_presenter
- ae_comp__event_session_obj_li: make lq prop optional; add plain-array fallback prop
- location/+page: refactor to $derived ae_acct, $effect+untrack for stores, simplified session/file sections
- location_page_menu: add optional data prop; export interface

Tests:
- Rename ae_events__event_badge.spec.ts → ae_events__event_badge.test.ts (extended coverage)
- All test files: 'warn' → 'warning' (Playwright API), addInitScript array-destructure pattern, import type fixes
- ae_defaults: remove duplicate hide_app_cfg key; meaningful sponsorship cfg_id placeholder
- create_event_badge.spec: fix import path to use $lib alias
- event_presenter.test: fix test URL to use /presenter/:id route

NOTE: location/+page.svelte — Element_manage_event_file_li_wrap no longer receives
allow_basic/allow_moderator (now default false); file list shows but management
actions may be restricted. Follow-up needed to restore auth__kv-based access.
2026-03-05 20:05:35 -05:00
..
2024-03-08 00:09:17 -05:00

Playwright tests (Aether)

Quick guide for running and editing the Playwright tests in this repo.

Running tests

  • Run the full test suite (uses playwright.config.ts):
npx playwright test -c playwright.config.ts
  • Run a single test file:
npx playwright test tests/path/to/file.test.ts -c playwright.config.ts
  • Run a single test by title (grep):
npx playwright test -g "Badge - interaction" -c playwright.config.ts

Notes

  • Tests in tests/disabled/ are ignored by default (see playwright.config.ts). Move flaky or environment-dependent tests there.
  • The runner starts a local dev server via npm run dev by default (see playwright.config.ts:webServer). Ensure the app can start on port 5173 or update the config.

Writing / modifying tests

  • Tests are TypeScript files under tests/ and should export Playwright test blocks. Example header:
import { test, expect } from '@playwright/test';

test('example', async ({ page }) => {
  await page.goto('/');
  await expect(page).toHaveTitle(/OSIT/);
});
  • Use page.route('**/v3/**', handler) to mock backend responses for deterministic tests.
  • Use page.addInitScript to inject ae_loc localStorage defaults when tests need authenticated/admin state.

Adding new tests

  • Create a new file tests/my_feature.test.ts.
  • Keep tests focused and deterministic: mock network calls and avoid relying on external services.
  • Place environment-sensitive tests in tests/disabled/ so they are not run in CI by default.

Committing

  • Stage and commit test changes as usual. Example:
git add tests/
git commit -m "test: add <description>"

Help

  • If a test fails due to external network calls or platform-specific behavior, try mocking the relevant endpoints and move the test to tests/disabled if it cannot be made deterministic.

Development / Testing / Demo environment information

These are IDs for records that we can use for testing. Please do not delete them. They are also used for demo purposes with clients.

Core Modules

  • Aether test/demo Account: '_XY7DXtc9MY' (1) "One Sky IT Demo"
  • Aether test/demo Site: '92vkYC4fVEl' (12) "One Sky IT Demo"
  • Aether test/demo Site Domain: '_6jcTbnJk-o' (12) "demo.localhost:5173"
  • Aether test/demo Site Domain: 'heXRgHOs4ns' (30) "sk-demo.oneskyit.com"
  • Aether test/demo Site Domain: 'DASm8fP92yw' (69) "dev-demo.oneskyit.com"
  • Aether test/demo Site Domain: '2i_0Za6yRPo' (2) "demo.oneskyit.com"
  • Aether test/demo Person: 'QWODAPCNLQU' (49) "Osiris Idem"
  • Aether test/demo Person: 'HMQRNPIXQMK' (48) "Cleo Idem"

Events Modules

  • Aether test/demo Event: 'pjrcghqwert' (1) "Demo One Sky IT Conference"
  • Aether test/demo Event Session: 'DOW3h7v6H42' (703) "How To Do Things"
  • Aether test/demo Event Presentation: '7U2eXSjR6H4' (1670) "Build a House"
  • Aether test/demo Event Presenter: 'gT-hxnifb-0' (2202) "Bob The Builder"
  • Aether test/demo Event File: 'OOsHXtng5mr' (2985) "1 Quick Test for macOS.mp4"
  • Aether test/demo Event Badge: 'UIJT-73-63-61' (37163) "Scott Idem"
  • Aether test/demo Event Person: 'ffkKxiHpOEC' (16603) "Scott Idem"
  • Aether test/demo Event Badge Template: 'jgfixEpYp1B' (18) "Dev Demo 202x"
  • Aether test/demo Event Badge Template: 'rzmUgsk7mkq' (19) "Dev Demo 202x Workshops"
  • Aether test/demo Event Location: 'VXXY-98-46-14' (26) "Ballroom 1"
  • Aether test/demo Event Location: 'FGRN-67-92-45' (298) "Ballroom AB"
  • Aether test/demo Event Location: 'PQKB-15-39-81' (78) "Poster Display Station A"

Journals Module

  • Aether test/demo Journal: 'BVYE-94-46-29' (42) "Testing Things"
  • Aether test/demo Journal Entry: 'xRx-Y4-h3-fU' (233) "Another Journal Entry in the Test Journal"

Archives Module

  • Aether test/demo Archive: 'nAA2bHLv8RK' (1) "One Sky Test Archive"
  • Aether test/demo Archive Content: 'UjKzrk-GKu5' (1) "Hosted File Test"