Repository navigation
Settings page regression tests (5/6): Logging and Debug tabs - #137
Conversation
Logging: Log Retention's default and its effect on how many days of log files are kept, its validation (in the browser and in the plugin), the tab's note on the retention in force, and the log viewer. Debug: Disable Test Data. A legacy fixture checks settings stored by Carbon Fields. With this, every setting on the settings page has regression tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BL2bFrTk84JMy3CPAsCTV9
conatus
left a comment
There was a problem hiding this comment.
Supplementary review: one spec selector depends on Carbon Fields. This adds to the inline findings already posted.
Generated by Claude Code
# Conflicts: # packages/join-e2e/tests/settings/support.ts
- One expectSaveRefused (from the Membership Plans branch), which tries the save rather than asking the form whether it's valid, so a form with `novalidate` can't slip through; saveSkippingBrowserChecksExpectingErrors is replaced by saveSkippingPageChecksExpectingErrors. The retention test re-enters its invalid values before the second save, whichever way the first was refused. - Log rotation is checked against the dates the test laid down, so a run across midnight passes, with fewer WP-CLI calls. - Each test's log files are backed up and put back afterwards. - The default retention test is skipped, saying why, when JOIN_FLOW_LOG_RETENTION_DAYS is set in packages/join-block/.env. - Skipped test for the Logging tab showing a stale log file (JOIN-172). - logInfo, logInvalidPlan and PHP_LOG_FILES are shared from support.ts with the Integrations logging spec. - No Carbon Fields class in the spec. - Docs: GoCardless, Chargebee and address lookup are no longer listed as untested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BL2bFrTk84JMy3CPAsCTV9
… tests Brings in #133 as merged, including its follow-up review changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BL2bFrTk84JMy3CPAsCTV9
Resolves a conflict in integrations-logging.spec.ts: this branch moved the logging helpers to support.ts as logInfo() and logInvalidPlan(), and master added sentTo() and a Sentry check that waits for the error's event. Keep both, using the renamed helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- An interrupted run no longer loses the real log files: the backup folder is empty between tests, so if it isn't, the next backup puts those files back first instead of replacing them. - The log helpers fail clearly if the plugin has no log directory, instead of working on files at the filesystem root. - Only tests that replace the log files back them up, instead of every test in the file. - "The tab shows the latest log" starts from no log files, so a stale one can't be shown instead (JOIN-172). - The Debug tests skip, rather than fail or pass trivially, when the form wasn't built with test data. The form says so in the console. - Whether JOIN_FLOW_LOG_RETENTION_DAYS replaces the default is read from the Logging tab, which the web server renders, not from WP-CLI. - One helper enters the invalid Log Retention values. - oauth2.googleapis.com is back in the hosts the default logging test checks: the fake API now serves it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The e2e check on 0628de0 failed before any test ran, and so did its re-run. In both, the runner couldn't resolve This is a network problem on GitHub's runner, not something in this PR or the repo, so there's no fix to push. Every other check is green. The e2e job needs running again once the runners can reach Ubuntu's package servers. I've used my one re-run, so it needs someone to click Re-run failed jobs, or a push to the branch will retrigger it. Generated by Claude Code |
Fifth of six settings page regression test PRs, and the last that adds tests (#138 adds type and format checks on top). Stacked on #136 → #135 → #134 → #133.
With this, every setting on the settings page has regression tests: what's saved, read back through
Settings::get, its effect on the plugin and the join form, and still working when stored the way Carbon Fields stores it.What's covered (
tests/settings/logging-debug.spec.ts)Logging
Debug
Legacy: retention and Disable Test Data in Carbon Fields' storage format are still read and still apply.
Supporting changes
JoinSettingsPage.expectSaveRefused()also counts the browser refusing to submit. NewsaveSkippingBrowserChecksExpectingErrors()turns that check off, so the plugin's own validation is tested too.Testing
Locally, the whole E2E suite: 208 passed, 7 skipped (6 known problems from the settings PRs, plus JOIN-158).
Generated by Claude Code