diff --git a/client/src/index.css b/client/src/index.css
index 7bea87652..2f93e4c62 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -769,7 +769,7 @@ input[type="number"], input[type="time"], input[type="date"], input[type="dateti
--fs-scale-caption: 1;
--success: #16a34a; --success-soft: #dcfce7;
- --danger: #dc2626; --danger-soft: #fef2f2;
+ --danger: #dc2626; --danger-soft: #fef2f2; --danger-text: #ffffff;
--warning: #d97706; --warning-soft: #fffbeb;
--info: #2563eb; --info-soft: #eff6ff;
@@ -866,7 +866,7 @@ input[type="number"], input[type="time"], input[type="date"], input[type="dateti
--day-tint-l-max: 0.88;
--success: #22c55e; --success-soft: rgba(34, 197, 94, 0.15);
- --danger: #ef4444; --danger-soft: rgba(239, 68, 68, 0.15);
+ --danger: #ef4444; --danger-soft: rgba(239, 68, 68, 0.15); --danger-text: #ffffff;
--warning: #f59e0b; --warning-soft: rgba(245, 158, 11, 0.15);
--info: #3b82f6; --info-soft: rgba(59, 130, 246, 0.15);
diff --git a/client/src/mobile/components/MContextMenu.tsx b/client/src/mobile/components/MContextMenu.tsx
index 48fd944ca..ff8170d56 100644
--- a/client/src/mobile/components/MContextMenu.tsx
+++ b/client/src/mobile/components/MContextMenu.tsx
@@ -7,7 +7,7 @@ import MSheet from './MSheet';
* card's own buttons offer, so this is a second way, never the only one.
*/
-export interface ContextAction {
+interface ContextAction {
key: string;
label: string;
icon: ReactElement;
@@ -38,7 +38,7 @@ export default function MContextMenu({ open, title, actions, onClose }: MContext
onClose();
action.onClick();
}}
- className={`flex w-full items-center gap-[11px] rounded-xl px-[10px] py-[11px] text-start text-[0.84375rem] font-semibold active:bg-[color:var(--m-ic)] ${
+ className={`flex w-full items-center gap-[11px] rounded-xl px-[10px] py-[11px] text-start text-body font-semibold active:bg-[color:var(--m-ic)] ${
danger ? 'text-[color:var(--m-st-danger)]' : 'text-m-ink'
}`}
>
diff --git a/client/src/mobile/components/MSkeleton.tsx b/client/src/mobile/components/MSkeleton.tsx
index 830cb2d1a..aeddd6b05 100644
--- a/client/src/mobile/components/MSkeleton.tsx
+++ b/client/src/mobile/components/MSkeleton.tsx
@@ -8,7 +8,7 @@ import { useTranslation } from '../../i18n';
* once as "Loading" for a screen reader; the shapes themselves are hidden from it.
*/
-export type MSkeletonVariant = 'rows' | 'cards' | 'detail' | 'map';
+type MSkeletonVariant = 'rows' | 'cards' | 'detail' | 'map';
interface MSkeletonProps {
variant: MSkeletonVariant;
@@ -69,6 +69,7 @@ export default function MSkeleton({ variant, count = 4, framed = true, className
return (
diff --git a/client/src/mobile/components/MSwipeRow.tsx b/client/src/mobile/components/MSwipeRow.tsx
index 8a16053b9..ce47a2a8f 100644
--- a/client/src/mobile/components/MSwipeRow.tsx
+++ b/client/src/mobile/components/MSwipeRow.tsx
@@ -45,9 +45,9 @@ const AXIS_BIAS = 1.5;
const FULL_SHARE = 0.62;
const TONE: Record
= {
- danger: 'bg-danger text-white', // theme-lint-disable: white on the danger fill, as the delete buttons draw it
+ danger: 'bg-danger text-[color:var(--danger-text)]',
accent: 'bg-m-act text-m-actfg',
- neutral: 'bg-[color:var(--m-faint)] text-white', // theme-lint-disable: white on the neutral action fill
+ neutral: 'bg-[color:var(--bg-inverse)] text-[color:var(--text-inverse)]',
};
// The row open now, so opening another closes it.
@@ -201,7 +201,7 @@ export default function MSwipeRow({
data-swipe-action=""
tabIndex={open ? 0 : -1}
onClick={() => run(action)}
- className={`flex h-full w-[76px] flex-none flex-col items-center justify-center gap-1 text-[0.6875rem] font-semibold ${TONE[action.tone]}`}
+ className={`flex h-full w-[76px] flex-none flex-col items-center justify-center gap-1 text-caption font-semibold ${TONE[action.tone]}`}
>
{action.label}
diff --git a/client/src/mobile/components/useLongPress.test.tsx b/client/src/mobile/components/useLongPress.test.tsx
index 1bb22c48e..1af4472ef 100644
--- a/client/src/mobile/components/useLongPress.test.tsx
+++ b/client/src/mobile/components/useLongPress.test.tsx
@@ -37,9 +37,13 @@ describe('useLongPress', () => {
it('FE-MOB-LONGPRESS-001: a held finger lifts the card, bumps and opens the menu, and the tap that ends it opens nothing', () => {
const { card, onLongPress, onClick } = setup();
touch(card, 'touchstart');
- act(() => vi.advanceTimersByTime(200));
+ act(() => {
+ vi.advanceTimersByTime(200);
+ });
expect(card.hasAttribute('data-pressing')).toBe(true);
- act(() => vi.advanceTimersByTime(300));
+ act(() => {
+ vi.advanceTimersByTime(300);
+ });
expect(onLongPress).toHaveBeenCalledOnce();
expect(pressHaptic).toHaveBeenCalled();
expect(card.hasAttribute('data-pressing')).toBe(false);
@@ -52,14 +56,18 @@ describe('useLongPress', () => {
const { card, onLongPress } = setup();
touch(card, 'touchstart');
touch(card, 'touchmove', 50, 80);
- act(() => vi.advanceTimersByTime(600));
+ act(() => {
+ vi.advanceTimersByTime(600);
+ });
expect(onLongPress).not.toHaveBeenCalled();
});
it('FE-MOB-LONGPRESS-003: a short tap is a tap', () => {
const { card, onLongPress, onClick } = setup();
touch(card, 'touchstart');
- act(() => vi.advanceTimersByTime(100));
+ act(() => {
+ vi.advanceTimersByTime(100);
+ });
touch(card, 'touchend');
fireEvent.click(card);
expect(onLongPress).not.toHaveBeenCalled();
diff --git a/client/src/mobile/screens/trip/tabs/MTodoListTab.tsx b/client/src/mobile/screens/trip/tabs/MTodoListTab.tsx
index 43daeefdc..771c5026b 100644
--- a/client/src/mobile/screens/trip/tabs/MTodoListTab.tsx
+++ b/client/src/mobile/screens/trip/tabs/MTodoListTab.tsx
@@ -214,6 +214,24 @@ export default function MTodoListTab({ planner }: { planner: TripPlanner }) {
)
}
+/** A swipe does what the card offers: tick it off, open it, or delete it. */
+function taskSwipeActions(
+ item: TodoItem,
+ t: (key: string) => string,
+ onToggle: (id: number, checked: boolean) => void,
+ onOpen: (id: number) => void,
+ onDelete?: (id: number) => void,
+): { leading: SwipeAction; trailing: SwipeAction[] } {
+ const leading: SwipeAction = item.checked
+ ? { label: t('todo.filter.open'), icon: RotateCcw, tone: 'neutral', onAction: () => onToggle(item.id, false) }
+ : { label: t('todo.filter.done'), icon: Check, tone: 'accent', onAction: () => onToggle(item.id, true) }
+ const trailing: SwipeAction[] = [
+ ...(onDelete ? [{ label: t('common.delete'), icon: Trash2, tone: 'danger' as const, onAction: () => onDelete(item.id) }] : []),
+ { label: t('common.edit'), icon: Pencil, tone: 'neutral', onAction: () => onOpen(item.id) },
+ ]
+ return { leading, trailing }
+}
+
function TaskCard({ item, members, today, onToggle, onOpen, onDelete }: {
item: TodoItem
members: TripMember[]
@@ -235,14 +253,7 @@ function TaskCard({ item, members, today, onToggle, onOpen, onDelete }: {
? (Number.isNaN(Date.parse(`${item.due_date}T00:00:00Z`)) ? item.due_date : formatDate(item.due_date, locale))
: null
- // A swipe does what the card offers: tick it off, open it, or delete it.
- const leading: SwipeAction = done
- ? { label: t('todo.filter.open'), icon: RotateCcw, tone: 'neutral', onAction: () => onToggle(item.id, false) }
- : { label: t('todo.filter.done'), icon: Check, tone: 'accent', onAction: () => onToggle(item.id, true) }
- const trailing: SwipeAction[] = [
- ...(onDelete ? [{ label: t('common.delete'), icon: Trash2, tone: 'danger' as const, onAction: () => onDelete(item.id) }] : []),
- { label: t('common.edit'), icon: Pencil, tone: 'neutral', onAction: () => onOpen(item.id) },
- ]
+ const { leading, trailing } = taskSwipeActions(item, t, onToggle, onOpen, onDelete)
return (
diff --git a/client/src/theme/README.md b/client/src/theme/README.md
index d68b1d52f..c4b9c15bc 100644
--- a/client/src/theme/README.md
+++ b/client/src/theme/README.md
@@ -27,7 +27,7 @@ free **if they follow the contract below**.
| Text | `--text-primary/secondary/muted/faint` · `text-content*` |
| Borders | `--border-primary/secondary/faint` · `border-edge*` |
| Accent | `--accent` (fill) · `--accent-text` (on fill) · `--accent-on` (on surface) · `--accent-hover` · `--accent-subtle` · `bg-accent` / `text-accent-on` / `bg-accent-subtle` |
-| Status | `--success/-soft`, `--danger/-soft`, `--warning/-soft`, `--info/-soft` · `bg-danger-soft text-danger` etc. |
+| Status | `--success/-soft`, `--danger/-soft`, `--warning/-soft`, `--info/-soft` · `bg-danger-soft text-danger` etc.; `--danger-text` for text on a solid `bg-danger` |
| Elevation | `--shadow-sm/md/lg/card/elevated/modal/dropdown/popover` · `shadow-modal` etc. |
| Overlay / inverse | `--overlay` · `--bg-inverse` / `--text-inverse` · `bg-inverse text-inverse-text` |
| Type tiers | `text-title` / `text-subtitle` / `text-body` / `text-caption` (scale with the user's per-tier multipliers) |
diff --git a/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx b/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx
index 6a0b85bf1..e7e630de9 100644
--- a/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx
+++ b/client/tests/unit/mobile/admin/MAdminAddonManager.test.tsx
@@ -63,7 +63,7 @@ afterEach(() => {
});
describe('MAdminAddonManager', () => {
- it('FE-MOB-AADD-001: shows the spinner while addons load', async () => {
+ it('FE-MOB-AADD-001: shows the placeholders while addons load', async () => {
server.use(
http.get('/api/admin/addons', async () => {
await delay(60);
@@ -72,9 +72,9 @@ describe('MAdminAddonManager', () => {
);
render();
- expect(document.querySelector('.animate-spin')).toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).toBeInTheDocument();
await screen.findByText('No addons available');
- expect(document.querySelector('.animate-spin')).not.toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).not.toBeInTheDocument();
});
it('FE-MOB-AADD-002: the header uses the light wordmark in light mode', async () => {
diff --git a/client/tests/unit/mobile/admin/MAdminCategoryManager.test.tsx b/client/tests/unit/mobile/admin/MAdminCategoryManager.test.tsx
index adcd43e89..9dc35dc56 100644
--- a/client/tests/unit/mobile/admin/MAdminCategoryManager.test.tsx
+++ b/client/tests/unit/mobile/admin/MAdminCategoryManager.test.tsx
@@ -29,12 +29,12 @@ describe('MAdminCategoryManager', () => {
server.use(http.get('/api/categories', () => HttpResponse.json({ categories: [] })));
});
- it('FE-MOB-MCAT-001: shows a spinner while the list is loading, then the empty state', async () => {
+ it('FE-MOB-MCAT-001: shows placeholders while the list is loading, then the empty state', async () => {
render();
- expect(document.querySelector('.animate-spin')).toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).toBeInTheDocument();
expect(await screen.findByText('No categories yet')).toBeInTheDocument();
- expect(document.querySelector('.animate-spin')).not.toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).not.toBeInTheDocument();
});
it('FE-MOB-MCAT-002: renders the card head and the New Category action', async () => {
diff --git a/client/tests/unit/mobile/admin/MAdminGitHubPanel.test.tsx b/client/tests/unit/mobile/admin/MAdminGitHubPanel.test.tsx
index 39c44c492..11a37a0d9 100644
--- a/client/tests/unit/mobile/admin/MAdminGitHubPanel.test.tsx
+++ b/client/tests/unit/mobile/admin/MAdminGitHubPanel.test.tsx
@@ -50,7 +50,7 @@ afterEach(() => {
async function renderPanel(props: { isPrerelease?: boolean } = {}) {
const view = render();
- await waitFor(() => expect(document.querySelector('.animate-spin')).not.toBeInTheDocument());
+ await waitFor(() => expect(document.querySelector('[data-skeleton]')).not.toBeInTheDocument());
return view;
}
@@ -73,7 +73,7 @@ describe('MAdminGitHubPanel', () => {
expect(screen.getAllByText('Helps me keep building TREK')).toHaveLength(2);
});
- it('FE-MOB-AGH-002: shows a spinner while the releases request is in flight', () => {
+ it('FE-MOB-AGH-002: shows placeholders while the releases request is in flight', () => {
server.use(
http.get('/api/admin/github-releases', async () => {
await new Promise(() => {});
@@ -82,7 +82,7 @@ describe('MAdminGitHubPanel', () => {
);
render();
- expect(document.querySelector('.animate-spin')).toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).toBeInTheDocument();
expect(screen.queryByText('Release History')).not.toBeInTheDocument();
});
diff --git a/client/tests/unit/mobile/admin/MAdminMcpTokensPanel.test.tsx b/client/tests/unit/mobile/admin/MAdminMcpTokensPanel.test.tsx
index f089e5edd..9943581da 100644
--- a/client/tests/unit/mobile/admin/MAdminMcpTokensPanel.test.tsx
+++ b/client/tests/unit/mobile/admin/MAdminMcpTokensPanel.test.tsx
@@ -80,7 +80,7 @@ describe('MAdminMcpTokensPanel', () => {
await screen.findByText('No MCP tokens have been created yet');
});
- it('FE-MOB-MCPTOK-002: shows spinners while both requests are in flight', async () => {
+ it('FE-MOB-MCPTOK-002: shows placeholders while both requests are in flight', async () => {
server.use(
http.get('/api/admin/mcp-tokens', async () => {
await new Promise(() => {});
@@ -93,7 +93,7 @@ describe('MAdminMcpTokensPanel', () => {
);
renderPanel();
- expect(document.querySelectorAll('.animate-spin')).toHaveLength(2);
+ expect(document.querySelectorAll('[data-skeleton]')).toHaveLength(2);
expect(screen.queryByText('No MCP tokens have been created yet')).not.toBeInTheDocument();
});
diff --git a/client/tests/unit/mobile/admin/MAdminPackingTemplateManager.test.tsx b/client/tests/unit/mobile/admin/MAdminPackingTemplateManager.test.tsx
index 0c7e40022..7e15fd17d 100644
--- a/client/tests/unit/mobile/admin/MAdminPackingTemplateManager.test.tsx
+++ b/client/tests/unit/mobile/admin/MAdminPackingTemplateManager.test.tsx
@@ -51,7 +51,7 @@ beforeEach(() => {
});
describe('MAdminPackingTemplateManager', () => {
- it('FE-MOB-APKG-001: shows the spinner while templates load, then the empty state', async () => {
+ it('FE-MOB-APKG-001: shows the placeholders while templates load, then the empty state', async () => {
server.use(
http.get('/api/admin/packing-templates', async () => {
await new Promise(r => setTimeout(r, 60));
@@ -60,12 +60,12 @@ describe('MAdminPackingTemplateManager', () => {
);
renderManager();
- expect(document.querySelector('.animate-spin')).toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).toBeInTheDocument();
expect(screen.getByText('Packing Templates')).toBeInTheDocument();
expect(screen.getByText('Create reusable packing lists for your trips')).toBeInTheDocument();
await screen.findByText('No templates created yet');
- expect(document.querySelector('.animate-spin')).not.toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).not.toBeInTheDocument();
});
it('FE-MOB-APKG-002: renders each template with its category and item counts', async () => {
diff --git a/client/tests/unit/mobile/admin/MAdminPermissionsPanel.test.tsx b/client/tests/unit/mobile/admin/MAdminPermissionsPanel.test.tsx
index 0a1e2dc2b..d388bdaba 100644
--- a/client/tests/unit/mobile/admin/MAdminPermissionsPanel.test.tsx
+++ b/client/tests/unit/mobile/admin/MAdminPermissionsPanel.test.tsx
@@ -47,7 +47,7 @@ afterEach(() => {
});
describe('MAdminPermissionsPanel', () => {
- it('FE-MOB-APERM-001: renders only the spinner while loading', () => {
+ it('FE-MOB-APERM-001: renders only the placeholders while loading', () => {
server.use(
http.get('/api/admin/permissions', async () => {
await new Promise(() => {});
@@ -56,7 +56,7 @@ describe('MAdminPermissionsPanel', () => {
);
renderPanel();
- expect(document.querySelector('.animate-spin')).toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).toBeInTheDocument();
expect(screen.queryByText('Permission Settings')).not.toBeInTheDocument();
});
diff --git a/client/tests/unit/mobile/admin/MAdminUsersSection.test.tsx b/client/tests/unit/mobile/admin/MAdminUsersSection.test.tsx
index 2f078300b..7f573959b 100644
--- a/client/tests/unit/mobile/admin/MAdminUsersSection.test.tsx
+++ b/client/tests/unit/mobile/admin/MAdminUsersSection.test.tsx
@@ -89,10 +89,10 @@ describe('MAdminUsersSection', () => {
expect(screen.getByRole('presentation')).toHaveAttribute('src', '/uploads/bob.png');
});
- it('FE-MOB-AUSERS-003: the spinner replaces the list while users are loading', () => {
+ it('FE-MOB-AUSERS-003: the placeholders replaces the list while users are loading', () => {
renderSection({ users: [ALICE], isLoading: true });
- expect(document.querySelector('.animate-spin')).toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).toBeInTheDocument();
expect(screen.queryByText('alice')).not.toBeInTheDocument();
});
diff --git a/client/tests/unit/mobile/atlas/MAtlas.test.tsx b/client/tests/unit/mobile/atlas/MAtlas.test.tsx
index b16832df5..a012885a0 100644
--- a/client/tests/unit/mobile/atlas/MAtlas.test.tsx
+++ b/client/tests/unit/mobile/atlas/MAtlas.test.tsx
@@ -23,11 +23,11 @@ beforeEach(() => {
});
describe('MAtlas', () => {
- it('FE-MOB-ATLASSCR-001: shows only a spinner while the atlas is loading', () => {
+ it('FE-MOB-ATLASSCR-001: shows only placeholders while the atlas is loading', () => {
setAtlas({ loading: true });
render();
- expect(document.querySelector('.animate-spin')).toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).toBeInTheDocument();
expect(screen.queryByText('atlas.bucketTab')).not.toBeInTheDocument();
});
@@ -37,7 +37,7 @@ describe('MAtlas', () => {
});
render();
- expect(document.querySelector('.animate-spin')).not.toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).not.toBeInTheDocument();
expect(screen.getByRole('button', { name: 'atlas.bucketTab' })).toBeInTheDocument();
// Stats card labels come from the real translations via useTranslation.
expect(screen.getByText('Countries')).toBeInTheDocument();
diff --git a/client/tests/unit/mobile/collections/MCollTripPickerSheet.test.tsx b/client/tests/unit/mobile/collections/MCollTripPickerSheet.test.tsx
index 9234bfd0a..360994f92 100644
--- a/client/tests/unit/mobile/collections/MCollTripPickerSheet.test.tsx
+++ b/client/tests/unit/mobile/collections/MCollTripPickerSheet.test.tsx
@@ -69,11 +69,11 @@ describe('MCollTripPickerSheet', () => {
expect(screen.getByText('Sun, Mar 1, 2020')).toBeInTheDocument()
})
- it('FE-MOB-CTRIPP-004: the spinner holds the list until the trips arrive', async () => {
+ it('FE-MOB-CTRIPP-004: the placeholders holds the list until the trips arrive', async () => {
let resolve!: (v: { trips: typeof TRIPS }) => void
vi.mocked(tripsApi.list).mockReturnValue(new Promise(r => { resolve = r }))
setup()
- expect(document.querySelector('.animate-spin')).not.toBeNull()
+ expect(document.querySelector('[data-skeleton]')).not.toBeNull()
expect(screen.queryByText('No trips yet')).not.toBeInTheDocument()
resolve({ trips: TRIPS })
diff --git a/client/tests/unit/mobile/collections/MCollections.test.tsx b/client/tests/unit/mobile/collections/MCollections.test.tsx
index 623822ace..b84245062 100644
--- a/client/tests/unit/mobile/collections/MCollections.test.tsx
+++ b/client/tests/unit/mobile/collections/MCollections.test.tsx
@@ -209,12 +209,12 @@ describe('MCollections', () => {
mocks.coll = makeHook()
})
- it('FE-MOB-COLSCR-001: shows only the spinner while the first load is in flight', () => {
+ it('FE-MOB-COLSCR-001: shows only the placeholders while the first load is in flight', () => {
mocks.coll = makeHook({ loading: true, collections: [], places: [], visiblePlaces: [] })
render()
expect(screen.queryByPlaceholderText('collections.search')).not.toBeInTheDocument()
- expect(document.querySelector('.animate-spin')).not.toBeNull()
+ expect(document.querySelector('[data-skeleton]')).not.toBeNull()
})
it('FE-MOB-COLSCR-002: with no lists at all the dock + button starts the first one; the screen has no button of its own', async () => {
@@ -465,7 +465,7 @@ describe('MCollections', () => {
mocks.coll = makeHook({ places: [], visiblePlaces: [], placesLoading: true })
const loadingView = render()
- expect(loadingView.container.querySelector('.animate-spin')).not.toBeNull()
+ expect(loadingView.container.querySelector('[data-skeleton]')).not.toBeNull()
mocks.coll = makeHook({ places: [], visiblePlaces: [] })
render()
diff --git a/client/tests/unit/mobile/journey/MJourney.test.tsx b/client/tests/unit/mobile/journey/MJourney.test.tsx
index eea6e6879..4abe92dfe 100644
--- a/client/tests/unit/mobile/journey/MJourney.test.tsx
+++ b/client/tests/unit/mobile/journey/MJourney.test.tsx
@@ -57,16 +57,16 @@ beforeEach(() => {
});
describe('MJourney', () => {
- it('FE-MOB-JLIST-001: shows a spinner while the first load is running', () => {
+ it('FE-MOB-JLIST-001: shows placeholders while the first load is running', () => {
setup({ loading: true, journeys: [] });
- expect(document.querySelector('.animate-spin')).toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).toBeInTheDocument();
expect(screen.queryByText('Other journeys')).not.toBeInTheDocument();
});
it('FE-MOB-JLIST-002: shows the mascot empty state when there are no journeys', () => {
setup();
expect(screen.getByText('Create a new Journey')).toBeInTheDocument();
- expect(document.querySelector('.animate-spin')).not.toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).not.toBeInTheDocument();
});
it('FE-MOB-JLIST-003: renders the active journey as hero with its counters', () => {
diff --git a/client/tests/unit/mobile/journey/MJourneyDetail.test.tsx b/client/tests/unit/mobile/journey/MJourneyDetail.test.tsx
index 9c469e280..f622a5b90 100644
--- a/client/tests/unit/mobile/journey/MJourneyDetail.test.tsx
+++ b/client/tests/unit/mobile/journey/MJourneyDetail.test.tsx
@@ -265,9 +265,9 @@ describe('MJourneyDetail', () => {
expect(document.querySelector('.h-\\[196px\\]')).not.toBeInTheDocument();
});
- it('FE-MOB-JDET-001: shows a spinner while the journey is loading', () => {
+ it('FE-MOB-JDET-001: shows placeholders while the journey is loading', () => {
setup({ loading: true, current: null });
- expect(document.querySelector('.animate-spin')).toBeInTheDocument();
+ expect(document.querySelector('[data-skeleton]')).toBeInTheDocument();
expect(screen.queryByTestId('journey-map')).not.toBeInTheDocument();
});
diff --git a/client/tests/unit/mobile/trip/MPlacesSaveToCollectionSheet.test.tsx b/client/tests/unit/mobile/trip/MPlacesSaveToCollectionSheet.test.tsx
index 059aa72a8..2a61bd5ec 100644
--- a/client/tests/unit/mobile/trip/MPlacesSaveToCollectionSheet.test.tsx
+++ b/client/tests/unit/mobile/trip/MPlacesSaveToCollectionSheet.test.tsx
@@ -67,11 +67,11 @@ describe('MPlacesSaveToCollectionSheet', () => {
expect(screen.getAllByText('0 places')).toHaveLength(1)
})
- it('FE-MOB-PSAVE-003: shows the spinner until the lists arrive', async () => {
+ it('FE-MOB-PSAVE-003: shows the placeholders until the lists arrive', async () => {
let resolve!: (v: CollectionListResponse) => void
vi.spyOn(collectionsApi, 'list').mockReturnValue(new Promise(r => { resolve = r }))
renderSheet()
- expect(document.querySelector('.animate-spin')).not.toBeNull()
+ expect(document.querySelector('[data-skeleton]')).not.toBeNull()
expect(screen.queryByText('You have no lists yet')).not.toBeInTheDocument()
resolve(listResponse([FAVORITES]))
expect(await screen.findByText('Favorites')).toBeInTheDocument()