Tests updated for v1.0.1
This commit is contained in:
parent
91fd6c2f43
commit
39d5570d37
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 <<JSON
|
||||
{"uid":"${SIDEBAR_UID}","title":"${SIDEBAR_TITLE}","description":"timezone regression","location":"Remote","category":"QA","start_datetime":"2026-04-10T09:00:00+00:00","end_datetime":"2026-04-10T10:00:00+00:00","repeat_type":"none","repeat_interval":1,"repeat_range_mode":"none"}
|
||||
JSON
|
||||
)
|
||||
SIDEBAR_CREATE_HTTP="$(curl -sS -u "${AUTH_USER}:${AUTH_PASS}" -H 'Content-Type: application/json' \
|
||||
-d "${SIDEBAR_JSON}" -o /tmp/remote_test_sidebar_create.json -w '%{http_code}' \
|
||||
"${BASE_URL}/wp-json/calendar/v1/events" || true)"
|
||||
if [[ "${SIDEBAR_CREATE_HTTP}" != "200" ]]; then
|
||||
record_fail "sidebar timezone setup create failed (http ${SIDEBAR_CREATE_HTTP})"
|
||||
else
|
||||
CREATED_SIDEBAR_EVENT_ID="$(python3 - <<'PY'
|
||||
import json
|
||||
p=json.load(open('/tmp/remote_test_sidebar_create.json'))
|
||||
print(p.get('data', {}).get('id', ''))
|
||||
PY
|
||||
)"
|
||||
if [[ -z "${CREATED_SIDEBAR_EVENT_ID}" ]]; then
|
||||
record_fail "sidebar timezone setup returned no id"
|
||||
elif [[ "${SSH_OK}" != "1" ]]; then
|
||||
echo "[remote-tests] WARN: SSH unavailable, skipping sidebar shortcode rendering check"
|
||||
else
|
||||
if ! "${SSH_PREFIX[@]}" "cd ${REMOTE_WP_PATH} && ${REMOTE_WP_CLI} eval 'echo do_shortcode(\"[calendar_sidebar_upcoming]\");' --allow-root" >/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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue