fix(client): daily-coding-challenge routing (#65942)

Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com>
This commit is contained in:
Oliver Eyton-Williams
2026-02-18 21:09:30 +01:00
committed by GitHub
parent 4974310729
commit 10d160b360
3 changed files with 19 additions and 27 deletions
+7 -4
View File
@@ -66,11 +66,9 @@ const mockApiAllChallenges = [
const mockDaysInMonth = new Date(year, month, 0).getDate();
test.describe('Daily Coding Challenges', () => {
test('should show not found page for invalid date', async ({ page }) => {
test('should redirect to archive for invalid date', async ({ page }) => {
await page.goto('/learn/daily-coding-challenge/invalid-date');
await expect(
page.getByText(/daily coding challenge not found\./i)
).toBeVisible();
await expect(page).toHaveURL('/learn/daily-coding-challenge/archive');
});
test('should show not found page for date without challenge', async ({
@@ -252,5 +250,10 @@ test.describe('Daily Coding Challenge Archive', () => {
await expect(page.getByTestId('calendar-day-completed')).toHaveCount(1);
await expect(page.getByTestId('calendar-day-not-completed')).toHaveCount(3);
await page.getByTestId('calendar-day-completed').click();
await expect(page).toHaveURL(
`/learn/daily-coding-challenge/${todayUsCentral}`
);
});
});