From 39d5570d37610c9b32240879c712ed97bbb862e8 Mon Sep 17 00:00:00 2001 From: Adrian Stephens Date: Fri, 3 Apr 2026 13:09:40 +0100 Subject: [PATCH] Tests updated for v1.0.1 --- README.md | 4 +-- tests/run_remote_tests.sh | 45 ++++++++++++++++++++++++++++++++ tests/smoke_tests.md | 1 + tests/user_ui_caldav_1hr_spec.md | 3 +++ 4 files changed, 51 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 108421c..393880e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Calendar plugin for wordpress site -Status as of 2026-03-31 when codex credit ran out: +## Bugs 1. Removal of plugin did not work. Need to set all files owner to www-data. - done 2. Deletion of event in ui doesn't delete event in thunderbird - done @@ -10,4 +10,4 @@ Status as of 2026-03-31 when codex credit ran out: 6. Updating an events description via caldav creates weird sequences, e.g. a space ends up as: text/html,%C2%A0": 7. In a private window, Click on event from not-logged-in calendar page shows event as a dialog box, it should show it as a panel with a subset of the edit event panel - i.e. the title, category, location, start and end and description. - -8. +8. Thunderbird cutting/pasting/moving events is - TBD. diff --git a/tests/run_remote_tests.sh b/tests/run_remote_tests.sh index c9a41e8..623e1c9 100755 --- a/tests/run_remote_tests.sh +++ b/tests/run_remote_tests.sh @@ -27,6 +27,7 @@ CREATED_EVENT_ID="" CREATED_REC_EVENT_ID="" CREATED_PRIVATE_EVENT_ID="" CREATED_SYNC_DELETE_EVENT_ID="" +CREATED_SIDEBAR_EVENT_ID="" DETECTED_URL_SLUG="" SSH_OK=0 @@ -124,6 +125,10 @@ cleanup() { curl -sS -u "${AUTH_USER}:${AUTH_PASS}" -X DELETE \ "${BASE_URL}/wp-json/calendar/v1/events/${CREATED_SYNC_DELETE_EVENT_ID}" >/dev/null || true fi + if [[ -n "${CREATED_SIDEBAR_EVENT_ID}" ]]; then + curl -sS -u "${AUTH_USER}:${AUTH_PASS}" -X DELETE \ + "${BASE_URL}/wp-json/calendar/v1/events/${CREATED_SIDEBAR_EVENT_ID}" >/dev/null || true + fi } trap cleanup EXIT @@ -343,6 +348,46 @@ PY fi fi +step "sidebar timezone rendering (Europe/London)" +SIDEBAR_UID="remote-sidebar-tz-$(date +%s)@calendar-plugin" +SIDEBAR_TITLE="Remote Sidebar TZ Check" +SIDEBAR_JSON=$(cat </tmp/remote_test_sidebar_render.html 2>/tmp/remote_test_sidebar_render.err; then + record_fail "sidebar shortcode render check failed" + else + if ! python3 - <<'PY' +import re +html=open('/tmp/remote_test_sidebar_render.html', encoding='utf-8', errors='ignore').read() +assert 'Remote Sidebar TZ Check' in html +assert re.search(r'10(?:\.00)?(?:–|-|–)11am', html), html +PY + then + record_fail "sidebar shortcode did not render expected Europe/London time range (expected 10–11am for 09:00Z input)" + fi + fi + fi +fi + step "caldav discovery compatibility" CALDAV_ROOT_URL="" if [[ -n "${CAL_CALDAV_PATH}" ]]; then diff --git a/tests/smoke_tests.md b/tests/smoke_tests.md index 79b0b8a..bbddd90 100644 --- a/tests/smoke_tests.md +++ b/tests/smoke_tests.md @@ -35,6 +35,7 @@ Use a minimal subset: ### SMK-004 Public UI Rendering - Render shortcode page with CE-002 and CE-003 present. - Assert no runtime error and event data is visible in default view. +- Sidebar shortcode (`[calendar_sidebar_upcoming]`) renders event date/time in `Europe/London` timezone semantics. ### SMK-005 ICS Endpoint - Fetch ICS link. diff --git a/tests/user_ui_caldav_1hr_spec.md b/tests/user_ui_caldav_1hr_spec.md index 8053830..b8b9b9f 100644 --- a/tests/user_ui_caldav_1hr_spec.md +++ b/tests/user_ui_caldav_1hr_spec.md @@ -60,6 +60,9 @@ Exercise the highest-value user flows across web UI, admin setup/users pages, re - Open Diagnostics page: - verify diagnostics snapshot renders. - click `Download Diagnostics` and confirm JSON file downloads. +- Render/check page area using `[calendar_sidebar_upcoming]`: + - confirm human-readable date/time format. + - confirm displayed times match `Europe/London` (not server UTC) for near-term timed events. ## Pass Criteria - No fatal errors.