Skip to content

Settings page regression tests (5/6): Logging and Debug tabs - #137

Open
conatus wants to merge 3 commits into
admin-e2e-integrationsfrom
admin-e2e-logging-debug
Open

conatus wants to merge 3 commits into
admin-e2e-integrationsfrom
admin-e2e-logging-debug

Conversation

@conatus

@conatus conatus commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

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

  • With Log Retention blank, 10 days of log files are kept, and the tab says so.
  • Log Retention (days) sets how many days' files are kept (checked by laying down dated files and letting Monolog rotate them). The tab says where the number came from.
  • 0, 2.5 and -1 are refused by the browser's own field check, and by the plugin when that check is skipped. Nothing on any tab is saved.
  • The tab shows the latest log.

Debug

  • In a test-data build the form is prefilled. Disable Test Data leaves it empty.

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. New saveSkippingBrowserChecksExpectingErrors() turns that check off, so the plugin's own validation is tested too.
  • Docs: the coverage table now has every tab filled in.

Testing

Locally, the whole E2E suite: 208 passed, 7 skipped (6 known problems from the settings PRs, plus JOIN-158).


Generated by Claude Code

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
Comment thread docs/e2e-testing.md Resolved

@conatus conatus left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@conatus conatus changed the title Settings page regression tests: Logging and Debug tabs Settings page regression tests (5/6): Logging and Debug tabs Oct 25, 2026
@linear-code

linear-code Bot commented Oct 25, 2026

Copy link
Copy Markdown

JOIN-173

@conatus conatus self-assigned this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants