Files
fotospiel-app/resources/js/admin/mobile/lib/mobileTour.test.ts
Codex Agent 718c129a8d onboarding tracking is now wired, the tour can be replayed from Settings, install‑banner reset is included, and empty states in Tasks/Members/Guest Messages now have guided CTAs.
What changed:
  - Onboarding tracking: admin_app_opened on first authenticated dashboard load; event_created, branding_configured,
    and invite_created on their respective actions.
  - Tour replay: Settings now has an “Experience” section to replay the tour (clears tour seen flag and opens via ?tour=1).
  - Empty states: Tasks, Members, and Guest Messages now include richer copy + quick actions.
  - New helpers + copy: Tour storage helpers, new translations, and related UI wiring.
2025-12-28 18:59:12 +01:00

25 lines
756 B
TypeScript

import { describe, expect, it } from 'vitest';
import { getTourSeen, resolveTourStepKeys, setTourSeen, TOUR_STORAGE_KEY } from './mobileTour';
describe('resolveTourStepKeys', () => {
it('includes the event step when there are no events', () => {
expect(resolveTourStepKeys(false)).toEqual(['event', 'qr', 'photos', 'push']);
});
it('omits the event step when events exist', () => {
expect(resolveTourStepKeys(true)).toEqual(['qr', 'photos', 'push']);
});
});
describe('tour storage helpers', () => {
it('stores and reads the seen flag', () => {
setTourSeen(false);
expect(getTourSeen()).toBe(false);
setTourSeen(true);
expect(getTourSeen()).toBe(true);
window.localStorage.removeItem(TOUR_STORAGE_KEY);
});
});