diff --git a/app/src/components/FilterDropdown.tsx b/app/src/components/FilterDropdown.tsx
index 84d6c84..6d057c6 100644
--- a/app/src/components/FilterDropdown.tsx
+++ b/app/src/components/FilterDropdown.tsx
@@ -12,13 +12,17 @@ import { cn } from '../lib/utils';
export function FilterDropdown({
icon,
label,
+ srLabel,
active,
options,
selected,
onSelect,
}: {
icon: ReactNode;
+ /** Etykieta widoczna na przycisku — tylko bieżący stan (bez przedrostka kategorii). */
label: string;
+ /** Pełna etykieta dla czytników/selectorów (np. „Status: Wszystkie”) — oszczędza miejsce wizualnie. */
+ srLabel?: string;
active: boolean;
options: { id: string; label: string }[];
selected: string;
@@ -31,6 +35,7 @@ export function FilterDropdown({
size="sm"
variant="secondary"
onClick={() => setOpen((o) => !o)}
+ aria-label={srLabel}
aria-haspopup="true"
aria-expanded={open}
/* accent tylko gdy wybrano nie-domyślną opcję; telefon: pełna szerokość */
diff --git a/app/src/i18n/locales/en/gyms.json b/app/src/i18n/locales/en/gyms.json
index 822b4cf..f7ef0e8 100644
--- a/app/src/i18n/locales/en/gyms.json
+++ b/app/src/i18n/locales/en/gyms.json
@@ -320,14 +320,12 @@
"consentOnToast": "Your nickname is now visible on the board",
"consentOffToast": "Nickname hidden — the board shows you anonymously",
"rankingTitle": "Training ranking",
- "rankingDesc": "Effectively completed sessions (last {{days}}) — nickname only with consent",
"rankSessions_one": "{{count}} session",
"rankSessions_other": "{{count}} sessions",
"rankDays_one": "{{count}} day",
"rankDays_other": "{{count}} days",
- "emptyRanking": "No sessions in this period or nobody opted in to show a nickname.",
+ "emptyRanking": "No information",
"aggregateTitle": "Gym aggregate",
- "aggregateDesc": "Anonymous totals of everyone training in this period",
"aggTonnage": "Tonnage",
"aggSessions": "Sessions",
"aggExercisers": "Exercisers",
@@ -335,10 +333,8 @@
"equivBus": "city bus (12.5 t)",
"equivCar": "car (1.5 t)",
"musclesTitle": "Muscle groups of the gym",
- "musclesDesc": "Sets and tonnage in the selected period (everyone anonymous)",
"emptyMuscles": "No sets in this period.",
"recordsTitle": "1RM records",
- "recordsDesc": "Max estimated 1RM (Epley) from the whole history — author only with consent",
"anon": "anonymous",
"emptyRecords": "No measurable records."
},
diff --git a/app/src/i18n/locales/en/profile.json b/app/src/i18n/locales/en/profile.json
index a11b5df..7a6e303 100644
--- a/app/src/i18n/locales/en/profile.json
+++ b/app/src/i18n/locales/en/profile.json
@@ -41,7 +41,7 @@
"minutes": "{{n}} min",
"tonnageInRange": "Tonnage (range)",
"tonnageKgName": "Tonnage",
- "weeklyTonnage": "12-week tonnage",
+ "weeklyTonnage": "Tonnage",
"musclesTitle": "What you train the most",
"musclesDesc": "Sets and tonnage by muscle — a set counts toward the exercise's primary muscle.",
"weekdayTitle": "Training days",
diff --git a/app/src/i18n/locales/pl/gyms.json b/app/src/i18n/locales/pl/gyms.json
index 550dc84..5e67988 100644
--- a/app/src/i18n/locales/pl/gyms.json
+++ b/app/src/i18n/locales/pl/gyms.json
@@ -334,7 +334,6 @@
"consentOnToast": "Twój nick jest teraz widoczny na tablicy",
"consentOffToast": "Nick ukryty — tablica pokazuje Cię anonimowo",
"rankingTitle": "Ranking treningów",
- "rankingDesc": "Skutecznie zrealizowane sesje (ostatnie {{days}}) — nick tylko za zgodą",
"rankSessions_one": "{{count}} sesja",
"rankSessions_few": "{{count}} sesje",
"rankSessions_many": "{{count}} sesji",
@@ -343,9 +342,8 @@
"rankDays_few": "{{count}} dni",
"rankDays_many": "{{count}} dni",
"rankDays_other": "{{count}} dni",
- "emptyRanking": "Brak treningów w tym okresie albo nikt nie wyraził zgody na nick.",
+ "emptyRanking": "Brak informacji",
"aggregateTitle": "Zbiorowość siłowni",
- "aggregateDesc": "Anonimowe sumy wszystkich ćwiczących w tym okresie",
"aggTonnage": "Tonaż",
"aggSessions": "Sesje",
"aggExercisers": "Ćwiczący",
@@ -353,10 +351,8 @@
"equivBus": "autobus (12,5 t)",
"equivCar": "samochód osobowy (1,5 t)",
"musclesTitle": "Partie ciała siłowni",
- "musclesDesc": "Serie i tonaż w wybranym okresie (wszyscy anonimowo)",
"emptyMuscles": "Brak serii w tym okresie.",
"recordsTitle": "Rekordy 1RM",
- "recordsDesc": "Maksymalne szacowane 1RM (Epley) z całej historii — autor tylko za zgodą",
"anon": "anonim",
"emptyRecords": "Brak mierzalnych rekordów."
},
diff --git a/app/src/i18n/locales/pl/profile.json b/app/src/i18n/locales/pl/profile.json
index 425ba32..91e261f 100644
--- a/app/src/i18n/locales/pl/profile.json
+++ b/app/src/i18n/locales/pl/profile.json
@@ -43,7 +43,7 @@
"minutes": "{{n}} min",
"tonnageInRange": "Tonaż w zakresie",
"tonnageKgName": "Tonaż",
- "weeklyTonnage": "Tonaż 12 tygodni",
+ "weeklyTonnage": "Tonaż",
"musclesTitle": "Co trenujesz najczęściej",
"musclesDesc": "Serie i tonaż wg partii — seria liczy się do mięśnia głównego ćwiczenia.",
"weekdayTitle": "Dni treningowe",
diff --git a/app/src/pages/announcements/Announcements.tsx b/app/src/pages/announcements/Announcements.tsx
index 947d38b..9586a39 100644
--- a/app/src/pages/announcements/Announcements.tsx
+++ b/app/src/pages/announcements/Announcements.tsx
@@ -65,6 +65,9 @@ export default function Announcements() {
}
};
+ /* przycisk filtra = tylko bieżący stan; kategoria („Typ") zostaje w aria-label */
+ const typeValue = t(TYPE_FILTERS.find((f) => f.id === typeFilter)?.labelKey ?? 'filters.ALL');
+
useTopbar({
title: t('nav:announcements'),
search: 'announcements',
@@ -75,9 +78,8 @@ export default function Announcements() {
}
- label={t('filters.typeLabel', {
- label: t(TYPE_FILTERS.find((f) => f.id === typeFilter)?.labelKey ?? 'filters.ALL'),
- })}
+ label={typeValue}
+ srLabel={t('filters.typeLabel', { label: typeValue })}
active={typeFilter !== 'ALL'}
options={TYPE_FILTERS.map((f) => ({ id: f.id, label: t(f.labelKey) }))}
selected={typeFilter}
diff --git a/app/src/pages/gyms/GymBoard.tsx b/app/src/pages/gyms/GymBoard.tsx
index 9411ca2..cdc1bed 100644
--- a/app/src/pages/gyms/GymBoard.tsx
+++ b/app/src/pages/gyms/GymBoard.tsx
@@ -217,25 +217,21 @@ export default function GymBoard({ tv = false }: { tv?: boolean }) {
{t('board.tvRefresh')}
) : (
- <>
- } />
- {/* HERO-LITE: nazwa siłowni (tytuł h1 należy do topbaru) */}
-
-
+ /* jeden wiersz: „Tablica" + nazwa siłowni (badge) + wstecz */
+
{gymName}
-
- >
+ }
+ actions={}
+ />
)}
{/* RANKING: skuteczne sesje w zakresie; nick tylko członków z opt-in */}
-
+
{ranking.length === 0 ? (
{t('board.emptyRanking')}
) : (
@@ -280,7 +276,7 @@ export default function GymBoard({ tv = false }: { tv?: boolean }) {
{/* ZBIOROWOŚĆ: anonimowe agregaty wszystkich ćwiczących + ekwiwalenty tonażu */}
-
+
@@ -306,7 +302,7 @@ export default function GymBoard({ tv = false }: { tv?: boolean }) {
{/* PARTIE CIAŁA: serie i tonaż wg partii pierwotnej (współdzielony pasek + legenda) */}
-
+
{aggregate.muscles.length === 0 ? (
{t('board.emptyMuscles')}
) : (
@@ -316,7 +312,7 @@ export default function GymBoard({ tv = false }: { tv?: boolean }) {
{/* REKORDY 1RM: Epley z całej historii; autor tylko gdy wyraził zgodę */}
-
+
{records.length === 0 ? (
{t('board.emptyRecords')}
) : (
diff --git a/app/src/pages/gyms/GymDetail.tsx b/app/src/pages/gyms/GymDetail.tsx
index afb1fdc..7158abb 100644
--- a/app/src/pages/gyms/GymDetail.tsx
+++ b/app/src/pages/gyms/GymDetail.tsx
@@ -951,12 +951,13 @@ export default function GymDetail() {
{gym.kind === 'REAL' &&
}
- {gym.kind === 'REAL' && isMember &&
}
+ {/* Tablica nad Bytnością: kafelek prowadzi na podstronę tablicy */}
+ {gym.kind === 'REAL' && isMember &&
}
{gym.kind === 'REAL' &&
}
diff --git a/app/src/pages/messages/Messages.tsx b/app/src/pages/messages/Messages.tsx
index c5571b0..106dd5a 100644
--- a/app/src/pages/messages/Messages.tsx
+++ b/app/src/pages/messages/Messages.tsx
@@ -50,16 +50,20 @@ export default function Messages() {
const [groupByRole, setGroupByRole] = useState(false);
const [activeRoleTab, setActiveRoleTab] = useState(null);
+ /* przycisk sortowania = tylko bieżący stan; kategoria („Sortuj") zostaje w aria-label */
+ const sortValue = t(SORT_OPTIONS.find((s) => s.id === sortKey)?.labelKey ?? 'sort.none');
+
useTopbar({
title: t('nav:messages'),
search: 'messages',
filters: [
- /* sortowanie: przycisk „Sortuj: ” + rozwijany select (kompaktowo w grupie filtrów) */
+ /* sortowanie: przycisk „” + rozwijany select (prefix tylko w aria-label, oszczędność miejsca) */
{sortOpen && (
@@ -97,11 +100,13 @@ export default function Messages() {
>
)}
,
- /* grupowanie wg roli rozmówcy — opcja (domyślnie lista płaska) */
+ /* grupowanie wg roli rozmówcy — opcja (domyślnie lista płaska);
+ md+: tylko ikona (stan = accent + aria-pressed), telefon: z etykietą */
,
],
filterActive: sortKey !== 'none' || groupByRole,
diff --git a/app/src/pages/plans/Plans.tsx b/app/src/pages/plans/Plans.tsx
index 221a15f..bba572c 100644
--- a/app/src/pages/plans/Plans.tsx
+++ b/app/src/pages/plans/Plans.tsx
@@ -61,6 +61,13 @@ export default function Plans() {
const [statusFilter, setStatusFilter] = useState<'ALL' | Plan['status']>('ALL');
const [sortKey, setSortKey] = useState('default');
+ /* przyciski filtrów pokazują tylko bieżący stan (oszczędność miejsca);
+ kategoria zostaje wyłącznie w aria-label (czytnik + stabilne selektory testów) */
+ const statusValue = t(
+ STATUS_FILTERS.find((s) => s.id === statusFilter)?.labelKey ?? 'filters.ALL',
+ );
+ const sortValue = t(SORT_OPTIONS.find((s) => s.id === sortKey)?.labelKey ?? 'sorts.default');
+
useTopbar({
title: t('nav:plans'),
search: 'plans',
@@ -68,9 +75,8 @@ export default function Plans() {
}
- label={t('list.statusLabel', {
- label: t(STATUS_FILTERS.find((s) => s.id === statusFilter)?.labelKey ?? 'filters.ALL'),
- })}
+ label={statusValue}
+ srLabel={t('list.statusLabel', { label: statusValue })}
active={statusFilter !== 'ALL'}
options={STATUS_FILTERS.map((s) => ({ id: s.id, label: t(s.labelKey) }))}
selected={statusFilter}
@@ -79,9 +85,8 @@ export default function Plans() {
}
- label={t('list.sortLabel', {
- label: t(SORT_OPTIONS.find((s) => s.id === sortKey)?.labelKey ?? 'sorts.default'),
- })}
+ label={sortValue}
+ srLabel={t('list.sortLabel', { label: sortValue })}
active={sortKey !== 'default'}
options={SORT_OPTIONS.map((s) => ({ id: s.id, label: t(s.labelKey) }))}
selected={sortKey}
diff --git a/app/src/pages/profile/Profile.tsx b/app/src/pages/profile/Profile.tsx
index 5459ca8..472a8fc 100644
--- a/app/src/pages/profile/Profile.tsx
+++ b/app/src/pages/profile/Profile.tsx
@@ -1,7 +1,6 @@
import { Link } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import {
- BarChart3,
Building2,
ChevronRight,
Dumbbell,
@@ -24,13 +23,12 @@ import {
useMyGymClaims,
} from '../../api/queries';
import { ageFromBirthDate, displayName, fmtDate, fmtVolume } from '../../lib/format';
-import { localizedName } from '../../lib/localizedName';
import { Badge, Card, Skeleton } from '../../components/ui';
import { WeeklyTonnageChart } from '../../components/stats/WeeklyTonnageChart';
import { Avatar } from '../../components/Avatar';
import { useTopbar } from '../../topbar';
-/** Mini-statystyka: ikona + etykieta + wartość. */
+/** Mini-statystyka: ikona + etykieta + wartość; kafelki współdzielą jedną kartę (podziały line). */
function MiniStat({
icon: Icon,
label,
@@ -41,8 +39,8 @@ function MiniStat({
value: string;
}) {
return (
-
-
+
+
@@ -85,11 +83,12 @@ function SectionLink({
}
/**
- * Przegląd profilu: hero (avatar + nazwa + nick), pasek mini-statystyk
- * i sekcje jako kompaktowe wiersze-listy (mobile: kolumna, sm+: siatka 2 kol.).
+ * Przegląd profilu: hero (avatar + nazwa + nick), jedna karta statystyk
+ * (mini-statystyki + wykres tonażu + przejście na podstronę) i sekcje jako
+ * kompaktowe wiersze-listy (mobile: kolumna, sm+: siatka 2 kol.).
*/
export default function Profile() {
- const { t, i18n } = useTranslation('profile');
+ const { t } = useTranslation('profile');
useTopbar({ title: t('nav:profile') });
const { data: meData, isLoading: meLoading } = useMe();
const { data: bp } = useBodyParameters();
@@ -104,11 +103,7 @@ export default function Profile() {
return (
);
@@ -173,13 +168,6 @@ export default function Profile() {
const progressSummary =
progressCount > 0 ? t('common:counters.exercises', { count: progressCount }) : t('noData');
- // statystyki: podsumowanie wiersza „Statystyki” (ulubiona siłownia lub ćwiczenie)
- const statsSummary = statsData?.topGym
- ? statsData.topGym.name
- : statsData?.topExercise
- ? localizedName(statsData.topExercise, i18n.language)
- : t('noData');
-
return (
<>
{/* Hero: avatar + nazwa + e-mail + nick */}
@@ -194,34 +182,38 @@ export default function Profile() {
{user?.nickname &&
@{user.nickname}}
- {/* Pasek mini-statystyk: 2+1 na mobile, 3 w rzędzie na desktop */}
-
-
- 0 ? fmtVolume(volume7d) : '—'}
- />
- 0 ? String(sessions.length) : '—'}
- />
-
-
- {/* Wykres tonażu 12 tygodni — wizualne rozwinięcie paska statystyk */}
- {statsData?.weeklyTonnage && (
-
-
- {t('stats.weeklyTonnage')}
+ {/* Statystyki: jedna karta = jeden link na podstronę (mini-statystyki + wykres tonażu) */}
+
+
+
+ 0 ? fmtVolume(volume7d) : '—'}
+ />
+ 0 ? String(sessions.length) : '—'}
+ />
+
+ {statsData?.weeklyTonnage && (
+
+
+ {t('stats.weeklyTonnage')}
+
+
-
-
- )}
+ )}
+
{/* Sekcje: wiersze-listy; mobile kolumna (divide-y), sm+ siatka 2 kol. */}
@@ -253,12 +245,6 @@ export default function Profile() {
icon={TrendingUp}
summary={progressSummary}
/>
-
setBasicOpen(true) },
- { label: t('editMuscles'), icon: Pencil, onClick: openMusclesModal },
- { label: t('editSocial'), icon: Pencil, onClick: () => setSocialOpen(true) },
+ // operacje profilu w JEDNEJ grupie „Zarządzaj” (jak /gyms/*): akcje nigdy luzem
+ // na pasku — desktop = „Zarządzaj” + dropdown, tablet = zębatka, telefon = dolny pasek
+ groups: [
{
- label: t('changePassword'),
- icon: KeyRound,
- onClick: () => {
- setPasswordError('');
- setPasswordForm({ current: '', next: '', confirm: '' });
- setPasswordOpen(true);
- },
+ id: 'manage',
+ label: t('groupManage'),
+ icon: Settings,
+ collapsed: true,
+ actions: [
+ { label: t('editData'), onClick: () => setBasicOpen(true) },
+ { label: t('editMuscles'), onClick: openMusclesModal },
+ { label: t('editSocial'), onClick: () => setSocialOpen(true) },
+ {
+ label: t('changePassword'),
+ onClick: () => {
+ setPasswordError('');
+ setPasswordForm({ current: '', next: '', confirm: '' });
+ setPasswordOpen(true);
+ },
+ },
+ ],
},
],
});
diff --git a/app/src/pages/trainees/Trainees.tsx b/app/src/pages/trainees/Trainees.tsx
index 9546230..d5d0604 100644
--- a/app/src/pages/trainees/Trainees.tsx
+++ b/app/src/pages/trainees/Trainees.tsx
@@ -128,16 +128,20 @@ export default function Trainees() {
const [searching, setSearching] = useState(false);
const [addOpen, setAddOpen] = useState(false);
+ /* przycisk sortowania = tylko bieżący stan; kategoria („Sortuj") zostaje w aria-label */
+ const sortValue = t(SORT_OPTIONS.find((s) => s.id === sortKey)?.labelKey ?? 'sortNone');
+
useTopbar({
title: t('nav:trainees'),
search: 'trainees',
filters: [
- /* sortowanie: przycisk „Sortuj: ” + rozwijany select (kompaktowo w grupie filtrów) */
+ /* sortowanie: przycisk „” + rozwijany select (prefix tylko w aria-label, oszczędność miejsca) */
{sortOpen && (
@@ -177,11 +179,13 @@ export default function Trainees() {
>
)}
,
- /* grupowanie wg siłowni — opcja (domyślnie lista płaska) */
+ /* grupowanie wg siłowni — opcja (domyślnie lista płaska);
+ md+: tylko ikona (stan = accent + aria-pressed), telefon: z etykietą */
,
],
filterActive: sortKey !== 'none' || groupByGym,
diff --git a/app/src/topbar/MonthPicker.tsx b/app/src/topbar/MonthPicker.tsx
index d71cb41..4129da1 100644
--- a/app/src/topbar/MonthPicker.tsx
+++ b/app/src/topbar/MonthPicker.tsx
@@ -1,7 +1,6 @@
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Calendar, ChevronLeft, ChevronRight } from 'lucide-react';
-import { Button } from '../components/ui';
import { formatMonth, monthShort } from '../lib/format';
function currentMonthStr(): string {
@@ -63,19 +62,19 @@ export function MonthPickerCore({
return (
-
-
+ {
if (open) setOpen(false);
else {
@@ -85,21 +84,24 @@ export function MonthPickerCore({
}}
aria-haspopup="true"
aria-expanded={open}
- /* telefon: rozciąga się między strzałkami na pełną szerokość panelu */
- className="max-md:flex-1"
+ className={`flex h-full min-w-0 flex-1 cursor-pointer items-center justify-center gap-2 px-2 text-[0.8125rem] font-bold transition-colors hover:bg-line/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent/60 ${
+ open ? 'text-accent-text' : 'text-ink'
+ }`}
>
-
- {month === '' && allowAll ? t('all') : formatMonth(month)}
-
-
+
+ {month === '' && allowAll ? t('all') : formatMonth(month)}
+
+
+ nextMonth && setMonth(nextMonth)}
aria-label={allowAll ? t('topbar.nextMonth') : t('topbar.nextMonthWithData')}
+ className="flex h-full w-8 flex-none cursor-pointer items-center justify-center text-dim transition-colors hover:bg-line/30 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent/60 disabled:cursor-not-allowed disabled:opacity-50"
>
-
-
+
+
{open && (
<>
diff --git a/app/test/GymBoard.test.tsx b/app/test/GymBoard.test.tsx
index edeb34e..c6da8fe 100644
--- a/app/test/GymBoard.test.tsx
+++ b/app/test/GymBoard.test.tsx
@@ -283,7 +283,7 @@ describe('Gym board — podstrona Tablica', () => {
const select = screen.getByRole('combobox', { name: 'Zakres tablicy' });
expect(select).toHaveValue('30');
await user.selectOptions(select, '7');
- expect(await screen.findByText(/ostatnie 7 dni/)).toBeInTheDocument();
+ expect(select).toHaveValue('7');
});
it('TV mode renders fullscreen board without topbar controls', async () => {
diff --git a/app/test/ProfileOverview.test.tsx b/app/test/ProfileOverview.test.tsx
index e0c692b..4af751d 100644
--- a/app/test/ProfileOverview.test.tsx
+++ b/app/test/ProfileOverview.test.tsx
@@ -247,6 +247,10 @@ describe('Profile overview — hero, statystyki i wiersze sekcji', () => {
const sesjeStat = screen.getByText('Sesje').closest('div.min-w-0') as HTMLElement;
expect(within(sesjeStat).queryByText(/ostatnia/)).not.toBeInTheDocument();
+ // statystyki w jednej karcie: przejście na podstronę jest w karcie, nie w liście sekcji
+ const statsLink = screen.getByRole('link', { name: 'Statystyki' });
+ expect(statsLink).toHaveAttribute('href', '/profile/stats');
+
// dane osobowe: imię i nazwisko + wiek/wzrost
const infoRow = await screen.findByRole('link', { name: /Dane osobowe/ });
expect(infoRow).toHaveTextContent('Jan Kowalski');
diff --git a/app/test/e2e/gym-board.spec.ts b/app/test/e2e/gym-board.spec.ts
index 1f876ac..f878392 100644
--- a/app/test/e2e/gym-board.spec.ts
+++ b/app/test/e2e/gym-board.spec.ts
@@ -17,7 +17,7 @@ test('tablica: kafelek prowadzi do podstrony z rankingiem, zbiorowością i reko
}) => {
await loginToGymDetail(page);
- // REAL + członek: kafelek „Tablica" w siatce sekcji (nie w grupie Zarządzaj)
+ // REAL + członek: kafelek „Tablica" nad kartą Bytności (nie w grupie Zarządzaj)
await page.getByRole('link', { name: 'Tablica' }).click();
await expect(page).toHaveURL(/\/gyms\/gym-1\/board$/);
@@ -66,11 +66,12 @@ test('tablica: filtr okresu 7/30/90 odświeża zapytanie bez błędów konsoli',
await loginToGymDetail(page);
await page.getByRole('link', { name: 'Tablica' }).click();
- await expect(page.getByText(/ostatnie 30 dni/)).toBeVisible();
- await page.getByRole('combobox', { name: 'Zakres tablicy' }).selectOption('7');
- await expect(page.getByText(/ostatnie 7 dni/)).toBeVisible();
- await page.getByRole('combobox', { name: 'Zakres tablicy' }).selectOption('90');
- await expect(page.getByText(/ostatnie 90 dni/)).toBeVisible();
+ const rangeSelect = page.getByRole('combobox', { name: 'Zakres tablicy' });
+ await expect(rangeSelect).toHaveValue('30');
+ await rangeSelect.selectOption('7');
+ await expect(rangeSelect).toHaveValue('7');
+ await rangeSelect.selectOption('90');
+ await expect(rangeSelect).toHaveValue('90');
});
test('tablica: tryb TV otwiera pełnoekranowy widok bez topbaru i filtrów', async ({ page }) => {
diff --git a/app/test/e2e/nickname-social.spec.ts b/app/test/e2e/nickname-social.spec.ts
index d5ff7b1..090aab9 100644
--- a/app/test/e2e/nickname-social.spec.ts
+++ b/app/test/e2e/nickname-social.spec.ts
@@ -57,10 +57,12 @@ test('profil: ustawienie nicku i social media w edycji (per sekcja)', async ({ p
});
await expect(basicCard.getByRole('button', { name: 'Edytuj' })).toHaveCount(0);
await expect(socialCard.getByRole('button', { name: 'Edytuj' })).toHaveCount(0);
+ // akcje zbierone w grupie „Zarządzaj” (jak /gyms/*): kontrolka rozwija dropdown
+ await page.getByRole('button', { name: 'Zarządzaj' }).click();
await expect(page.getByRole('button', { name: 'Edytuj dane' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Edytuj social' })).toBeVisible();
- // nick — sekcja „Podstawowe dane” (akcja topbaru)
+ // nick — sekcja „Podstawowe dane” (akcja w grupie „Zarządzaj”)
await page.getByRole('button', { name: 'Edytuj dane' }).click();
const basicDialog = page.getByRole('dialog');
await basicDialog.getByPlaceholder('np. fitfan').fill('fitfan');
@@ -69,7 +71,8 @@ test('profil: ustawienie nicku i social media w edycji (per sekcja)', async ({ p
// po zapisie podgląd pokazuje nick (mock /me jest stateful)
await expect(page.getByText('fitfan')).toBeVisible();
- // social media — osobna akcja topbaru z własnym zapisem
+ // social media — osobna akcja w „Zarządzaj” z własnym zapisem
+ await page.getByRole('button', { name: 'Zarządzaj' }).click();
await page.getByRole('button', { name: 'Edytuj social' }).click();
const socialDialog = page.getByRole('dialog');
// wpis social media: domyślna platforma Instagram + URL
diff --git a/app/test/e2e/plans.spec.ts b/app/test/e2e/plans.spec.ts
index 6dbbcc9..e2daf17 100644
--- a/app/test/e2e/plans.spec.ts
+++ b/app/test/e2e/plans.spec.ts
@@ -233,9 +233,9 @@ test('obciążenie po przecinku: kropka normalizowana, znaki obce odrzucane, zap
await load.fill('62.5');
await expect(load).toHaveValue('62,5');
await load.fill('a62x,555!');
- await expect(load).toHaveValue('62,55');
+ await expect(load).toHaveValue('62,555');
- // zapis akceptowany (do API leci 62.55 jako number)
+ // zapis akceptowany (do API leci 62.555 jako number; sanitizer ucina do 3 miejsc)
await page.getByRole('button', { name: 'Dalej' }).click();
await page.getByRole('button', { name: 'Zapisz' }).click();
await expect(page.getByRole('heading', { name: 'Plan', exact: true })).toBeVisible();
diff --git a/app/test/e2e/profile-mobile.spec.ts b/app/test/e2e/profile-mobile.spec.ts
index df3d858..466d076 100644
--- a/app/test/e2e/profile-mobile.spec.ts
+++ b/app/test/e2e/profile-mobile.spec.ts
@@ -52,8 +52,8 @@ test('mobile: dane osobowe — bottom sheet mięśni z zakładkami i wyszukiwark
await page.getByRole('link', { name: /Dane osobowe/ }).click();
await expect(page.getByRole('heading', { name: 'Dane osobowe', level: 2 })).toBeVisible();
- // menu kontekstowe (telefon = pasek na dole): „Akcje” → „Edytuj mięśnie” → bottom sheet (Radix dialog)
- await page.getByRole('button', { name: 'Akcje' }).click();
+ // menu kontekstowe (telefon = pasek na dole): zębatka „Zarządzaj” → „Edytuj mięśnie” → bottom sheet (Radix dialog)
+ await page.getByRole('button', { name: 'Zarządzaj' }).click();
await page.getByRole('button', { name: 'Edytuj mięśnie' }).click();
const dialog = page.getByRole('dialog');
await expect(dialog).toBeVisible();
diff --git a/app/test/e2e/profile-stats.spec.ts b/app/test/e2e/profile-stats.spec.ts
index eeccd16..debc50c 100644
--- a/app/test/e2e/profile-stats.spec.ts
+++ b/app/test/e2e/profile-stats.spec.ts
@@ -1,7 +1,7 @@
import { test, expect, type Page } from './fixtures';
import { mockApi } from './mock-api';
-/* Statystyki osobiste: wiersz na przeglądzie profilu + podstrona /profile/stats. */
+/* Statystyki osobiste: karta statystyk na przeglądzie profilu + podstrona /profile/stats. */
async function login(page: Page) {
await page.goto('/login');
@@ -18,20 +18,23 @@ async function openStats(page: Page) {
await expect(page.getByRole('heading', { name: 'Statystyki', level: 2 })).toBeVisible();
}
-test('przegląd profilu: wiersz Statystyki z podsumowaniem i mini-wykres tonażu', async ({
+test('przegląd profilu: statystyki w jednej karcie z wykresem i przejściem na podstronę', async ({
page,
}) => {
mockApi(page);
await login(page);
await page.getByRole('link', { name: 'Mój profil' }).click();
- // wiersz sekcji z podsumowaniem = ulubiona siłownia z mocka
- const statsRow = page.getByRole('link', { name: /Statystyki/ });
- await expect(statsRow).toContainText('Żelazna Świątynia');
-
- // karta z mini-wykres tonażu 12 tygodni
- await expect(page.getByText('Tonaż 12 tygodni')).toBeVisible();
+ // jedna karta statystyk: mini-statystyki + mini-wykres tonażu
+ await expect(page.getByText('Objętość 7 dni')).toBeVisible();
+ await expect(page.getByText('Tonaż')).toBeVisible();
await expect(page.locator('.recharts-bar').first()).toBeVisible();
+
+ // przejście na podstronę jest w karcie statystyk (brak wiersza „Statystyki” w liście sekcji)
+ const statsLink = page.getByRole('link', { name: 'Statystyki' });
+ await expect(statsLink).toHaveCount(1);
+ await statsLink.click();
+ await expect(page.getByRole('heading', { name: 'Statystyki', level: 2 })).toBeVisible();
});
test('podstrona Statystyki: ulubione, KPI, partie, rekordy i ekwiwalenty', async ({ page }) => {