April 20, 2026
|
5 min read
|
6 views

QA Test Plan: KAC-0776 Admin Whiteboard Showing Yesterday's Lessons

Bug Summary

Before 9AM JST, the admin whiteboard shows yesterday's lessons instead of today's. This happens because the server runs in UTC, and "today" in UTC is still yesterday in JST during that window.

Bug Window by Tester Timezone

Test during these times to reproduce the bug. Outside these windows, UTC and JST share the same calendar date so the bug is invisible.

Tester's timezone

Bug window (local time)

UTC

3PM – midnight

WAT (GMT+1)

4PM – 1AM next day

PHT (GMT+8)

11PM – 8AM next day

JST (GMT+9)

Midnight – 9AM

Pre-test Setup

  1. Log in as an admin user

  2. Go to profile → set timezone to (GMT+9) Asia/Tokyo

  3. Do NOT change your system clock — just test inside the bug window above

  4. Open Chrome DevTools → Console tab (to watch for hydration warnings)


Phase 1: Reproduce the Bug (preprod, old code)

Test 1.1 — Default date shows yesterday (the reported bug)

Steps:

  1. Navigate to /admin/whiteboard without any URL params (no ?date=)

  2. Look at the date shown in the date picker

Example: Testing at 11PM PHT on April 17 (= 8AM JST April 18):

  • Expected (correct behavior): Date picker shows April 18 (today in JST)

  • Actual (bug): Date picker shows April 17 (yesterday in JST)

Pass criteria: Bug is confirmed when the date shown is yesterday's JST date.

Test 1.2 — Outside the bug window, everything works

Steps:

  1. Wait until after 9AM JST (after 8AM PHT / 1AM WAT)

  2. Reload /admin/whiteboard without params

Example: Testing at 2AM PHT on April 18 (= 10AM JST April 18):

  • Expected: Date picker shows April 18 (today in JST)

  • Actual: Date picker shows April 18 ✓

This confirms the bug only happens before 9AM JST — matching the original report from Phil.


Phase 2: Verify the Fix (fix branch deployed on preview URL)

Use the LATEST preview deployment URL from the Vercel dashboard. Old preview URLs from earlier commits will NOT have the fix.

Test 2.1 — Default date now shows correct JST date (main test)

Steps:

  1. Navigate to /admin/whiteboard without ?date= param

  2. Check the date picker

Example: Testing at 11PM PHT on April 17 (= 8AM JST April 18):

  • Expected: Date picker shows April 18

  • Fail indicator: If it still shows April 17, the fix is not working

Test 2.2 — Pick a specific date

Steps:

  1. Click the date picker

  2. Select a different date (e.g., April 15)

Expected:

  • Lessons update to April 15's classes

  • URL updates to include ?date=2026-04-15

Test 2.3 — Reset button returns to timezone-aware today

Steps:

  1. After selecting a specific date in Test 2.2

  2. Click the Reset button

Example: Testing at 11PM PHT on April 17:

  • Expected: Date resets to April 18 (JST today), URL ?date= param is cleared

  • Fail indicator: If it resets to April 17, the fix is not working

Test 2.4 — No hydration errors

Steps:

  1. Open DevTools Console before loading the page

  2. Navigate to /admin/whiteboard

Expected: No red hydration mismatch warnings (e.g., "Text content does not match server-rendered HTML")

Test 2.5 — Non-HQ user redirect still works

Steps:

  1. Log in as a non-HQ user (one assigned to a specific school)

  2. Navigate to /admin/whiteboard with NO URL params

Expected: Redirected to /admin/whiteboard?schools=<your-school> automatically


Phase 3: Cross-Timezone Verification (optional but recommended)

Confirms the fix correctly uses the user's configured timezone, not a hardcoded one.

Test 3.1 — Change user timezone to WAT

Steps:

  1. Go to profile → set timezone to (GMT+1) West Africa Time (Lagos)

  2. Navigate to /admin/whiteboard without params

Example: Testing at 9PM WAT on April 17:

  • Expected: Date picker shows April 17 (still April 17 in WAT)

  • Fail indicator: Shows April 18 (using JST instead of user's timezone)

Test 3.2 — Change user timezone to PHT

Steps:

  1. Set timezone to (GMT+8) Philippines Time

  2. Navigate to /admin/whiteboard without params

Example: Testing at 11PM PHT on April 17:

  • Expected: Date picker shows April 17 (still April 17 in PHT)

  • Fail indicator: Shows April 18 (using JST) or April 16 (using UTC)

Test 3.3 — Change back to JST

Steps:

  1. Set timezone back to (GMT+9) Asia/Tokyo

  2. Navigate to /admin/whiteboard without params

Expected: Date picker shows April 18 again (JST today)


Pass/Fail Summary

#

Test

Pass

Fail

1.1

Preprod reproduces the bug

Shows yesterday's JST date

—

2.1

Fix shows correct JST "today"

Shows today's JST date

Shows UTC "today"

2.2

Manual date selection works

Correct lessons load

Wrong lessons or error

2.3

Reset returns to correct today

Matches Test 2.1

Falls back to UTC

2.4

No hydration warnings

Clean console

Red warnings in console

2.5

Non-HQ redirect works

School pre-selected

No redirect

3.1

WAT user sees WAT today

Correct WAT date

Wrong date

3.2

PHT user sees PHT today

Correct PHT date

Wrong date

3.3

Back to JST shows JST today

Correct JST date

Wrong date


Notes for QA

  • You do NOT need to change your system clock

  • You do NOT need to use Chrome's Sensors tab timezone override (it doesn't affect new Date())

  • Use the LATEST preview deployment URL from the Vercel dashboard — stale preview URLs will not have the fix

  • If a test fails, capture a screenshot of the URL, the date picker, and any console errors

Related Issue

  • Original report: Bug reported by Nadine (Tech Team), relayed to Phil B

  • Tech lead confirmation: "This happens before 9AM. Once the time changes to 9AM, everything seems to work as expected."

Published with Braandly