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.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { resolveInstallBannerState } from './installBanner';
|
||||
import { resolveInstallBannerState, shouldShowInstallBanner } from './installBanner';
|
||||
|
||||
describe('resolveInstallBannerState', () => {
|
||||
it('returns null when already installed', () => {
|
||||
@@ -22,3 +22,21 @@ describe('resolveInstallBannerState', () => {
|
||||
expect(resolveInstallBannerState({ isInstalled: false, isStandalone: false, canInstall: false, isIos: false })).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('shouldShowInstallBanner', () => {
|
||||
it('returns null when dismissed', () => {
|
||||
const result = shouldShowInstallBanner(
|
||||
{ isInstalled: false, isStandalone: false, canInstall: true, isIos: true },
|
||||
true,
|
||||
);
|
||||
expect(result).toBeNull();
|
||||
});
|
||||
|
||||
it('returns state when not dismissed', () => {
|
||||
const result = shouldShowInstallBanner(
|
||||
{ isInstalled: false, isStandalone: false, canInstall: true, isIos: false },
|
||||
false,
|
||||
);
|
||||
expect(result).toEqual({ variant: 'prompt' });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user