Dashboard: etykieta najwyzszy wynik zamiast rekord
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user