Dashboard: etykieta najwyzszy wynik zamiast rekord

This commit is contained in:
tisachi
2026-10-17 06:19:16 +02:00
parent 85e1d60d0a
commit 0d6b804463
3 changed files with 4 additions and 4 deletions

View File

@@ -441,7 +441,7 @@ export default function Dashboard() {
className="sm:col-span-3"
label="Killstreak"
value={data.killstreak}
sub={`rekord: ${daysPlural(killstreakBest)}`}
sub={`najwyższy wynik: ${daysPlural(killstreakBest)}`}
trailing={
data.killstreakDays != null ? <StreakDots days={data.killstreakDays} /> : null
}

View File

@@ -155,7 +155,7 @@ describe('Dashboard — statystyki motywacyjne', () => {
renderApp();
await login(user);
expect(await screen.findByText('rekord: 5 dni')).toBeInTheDocument();
expect(await screen.findByText('najwyższy wynik: 5 dni')).toBeInTheDocument();
expect(screen.getByText('Ukończone plany', { exact: true })).toBeInTheDocument();
// Dorobek treningów w kafelku „Ukończone plany" (12 sesji z mocka).
expect(screen.getByText('12', { exact: true })).toBeInTheDocument();
@@ -184,7 +184,7 @@ describe('Dashboard — statystyki motywacyjne', () => {
const { container } = renderApp();
await login(user);
await screen.findByText('rekord: 5 dni');
await screen.findByText('najwyższy wynik: 5 dni');
const dots = container.querySelectorAll('[data-testid="streak-dots"] span');
expect(dots).toHaveLength(30);
const on = [...dots].filter((el) => (el.getAttribute('class') ?? '').includes('bg-accent'));

View File

@@ -21,7 +21,7 @@ test('udane logowanie przekierowuje na dashboard', async ({ page }) => {
await expect(page.getByText('Tempo w tym tygodniu', { exact: true })).toBeVisible();
await expect(page.getByText('1/3', { exact: true })).toBeVisible();
await expect(page.getByText('Killstreak', { exact: true })).toBeVisible();
await expect(page.getByText('rekord: 5 dni')).toBeVisible();
await expect(page.getByText('najwyższy wynik: 5 dni')).toBeVisible();
await expect(page.getByText('Ukończone plany', { exact: true })).toBeVisible();
});