Plany: usunieto kolumne Trudnosc z tabeli serii (trudnosc uzupelnia cwiczacy dopiero po wykonaniu serii, w sesji)

This commit is contained in:
tisachi
2026-09-13 22:26:47 +02:00
parent 07e9adabe3
commit d466bc4e50
3 changed files with 26 additions and 3 deletions

View File

@@ -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();