diff --git a/app/src/pages/plans/plan-editor/ExerciseEditor.tsx b/app/src/pages/plans/plan-editor/ExerciseEditor.tsx index 1955ec5..1147c9f 100644 --- a/app/src/pages/plans/plan-editor/ExerciseEditor.tsx +++ b/app/src/pages/plans/plan-editor/ExerciseEditor.tsx @@ -18,12 +18,13 @@ function setsSummary(sets: EditorSet[]): string { const SET_INPUT_CLS = 'w-full rounded-[10px] border border-line bg-input px-2.5 py-1.5 text-[0.9rem] text-ink shadow-(--inset-shadow) focus:border-accent-text focus:ring-[3px] focus:ring-accent/18 focus:outline-none'; +/* Trudności NIE planujemy — to pole uzupełnia ćwiczący dopiero po wykonaniu serii + (w oknie „Uzupełnij serię” podczas sesji). */ const SET_COLUMNS: { key: keyof EditorSet; label: string; inputMode: 'numeric' | 'decimal' }[] = [ { key: 'reps', label: 'Powt.', inputMode: 'numeric' }, { key: 'loadKg', label: 'Obciążenie', inputMode: 'decimal' }, { key: 'restSec', label: 'Przerwa', inputMode: 'numeric' }, { key: 'rir', label: 'RIR', inputMode: 'numeric' }, - { key: 'difficulty', label: 'Trudność', inputMode: 'numeric' }, ]; /* Ćwiczenie dnia: nazwa + zmiana kolejności + Wyniki/Usuń + kompaktowa tabela @@ -120,7 +121,7 @@ export function ExerciseEditor({ {/* relative: sr-only (absolute) w nagłówku nie rozlewa dokumentu poza scroll container */}
| diff --git a/app/src/pages/plans/plan-editor/types.ts b/app/src/pages/plans/plan-editor/types.ts index 394e75b..257e188 100644 --- a/app/src/pages/plans/plan-editor/types.ts +++ b/app/src/pages/plans/plan-editor/types.ts @@ -28,7 +28,8 @@ export const DEFAULT_SET: EditorSet = { loadKg: '20', restSec: '90', rir: '2', - difficulty: '3', + // trudności nie planujemy — uzupełnia ją ćwiczący po wykonaniu serii (sesja) + difficulty: '', }; export function emptyWeek(): EditorWeek { diff --git a/app/test/PlanEditor.test.tsx b/app/test/PlanEditor.test.tsx index a9540e2..7b058b1 100644 --- a/app/test/PlanEditor.test.tsx +++ b/app/test/PlanEditor.test.tsx @@ -331,6 +331,27 @@ describe('PlanEditor — data startu i menu kontekstowe', () => { expect(screen.getByText(/Tylko sprzęt siłowni/)).toBeInTheDocument(); }); + it('krok 2: kolumna „Trudność” nie jest planowana (uzupełniana dopiero po wykonaniu serii)', async () => { + mockApi({}); + const user = userEvent.setup(); + renderApp(); + await loginAndOpenNewPlan(user); + + await user.type(screen.getByPlaceholderText('np. Plan masowy 8-tygodniowy'), 'Plan'); + await user.click(screen.getByRole('button', { name: 'Dalej' })); + await user.click(screen.getByRole('button', { name: 'Poniedziałek' })); + await user.click(screen.getByRole('button', { name: 'dodaj ćwiczenie…' })); + await user.click(await screen.findByRole('option', { name: /Przysiady/ })); + + // tabela serii: # / Powt. / Obciążenie / Przerwa / RIR — bez „Trudności” + expect(screen.getByRole('columnheader', { name: 'Powt.' })).toBeInTheDocument(); + expect(screen.getByRole('columnheader', { name: 'Obciążenie' })).toBeInTheDocument(); + expect(screen.getByRole('columnheader', { name: 'Przerwa' })).toBeInTheDocument(); + expect(screen.getByRole('columnheader', { name: 'RIR' })).toBeInTheDocument(); + expect(screen.queryByRole('columnheader', { name: 'Trudność' })).not.toBeInTheDocument(); + expect(screen.queryByRole('textbox', { name: 'Seria 1: Trudność' })).not.toBeInTheDocument(); + }); + it('wizard: pusta lista siłowni — informacja z linkiem do /gyms', async () => { mockApi({}); const user = userEvent.setup(); |
|---|