Skip to content

Settings page regression tests (2/6): Theme and Copy tabs - #134

Open
conatus wants to merge 3 commits into
admin-interface-end-to-end-testsfrom
admin-e2e-theme-copy
Open

conatus wants to merge 3 commits into
admin-interface-end-to-end-testsfrom
admin-e2e-theme-copy

Conversation

@conatus

@conatus conatus commented Oct 23, 2026

Copy link
Copy Markdown
Member

Stacked on #133 (foundation + Features). Review and merge that first; this PR's base will then switch to master.

Theme (theme.spec.ts)

  • Colour defaults (#007bff, #dfdcda, #f4f1ee) apply before anything is saved.
  • Primary Color reaches the form's CSS variables and colours its buttons. The same is checked for Gray Color and Background Color.
  • Custom Css is applied to the join form's page.
  • Legacy data: Theme settings in today's Carbon Fields format still style the form.

Copy (copy.spec.ts)

Every setting's default (or built-in fallback) and where it shows:

  • Details step:
    • About You heading and copy;
    • Date of Birth heading and copy;
    • Password Purpose;
    • the custom fields section heading, including removing it;
    • Contact Details heading and copy;
    • Contact Consent copy;
    • "How did you hear about us?" heading, options (trimmed, blanks dropped) and details label;
    • Privacy Copy.
  • Plan step: Membership Tiers heading and copy (and its built-in default), and Currency Selection copy, shown only when there's a choice of currency.
  • Direct Debit: the bank details step (Guarantee wording) and the confirmation step, using the organisation name, bank name and email. The "Join …" button and the Joining Verb, with its "Joining" fallback.
  • Sidebar: heading and stage label, with their fallbacks.
  • Legacy data: Copy settings in today's format still show.

Known problems, filed and kept as test.fixme

  • JOIN-162: Home Address Copy never shows. The form's condition is inverted and depends on a build-time flag the plugin never sets.
  • JOIN-163: the "Day of month to take payment" copy is passed to the form but nothing displays it.
  • JOIN-164: Organisation Name, Bank Name and Email are marked required (*) but save blank.

Supporting changes

  • JoinSettingsPage gains setColor and setRichText. Pressing Enter in the colour picker submits the whole form, so the helper avoids it.
  • getSettings reads many settings in one WP-CLI call.
  • New seed page e2e-custom-fields, with one custom field.
  • openJoinForm now starts the form afresh. It remembers its step in session storage and in the history entry, which reopening the same URL keeps.

Results

Full E2E suite in a cloud session: 142 passed, 5 skipped (JOIN-158, JOIN-161 to JOIN-164), 9.5 minutes.


Generated by Claude Code

Theme: colour defaults, each colour reaching the form's styles (primary on
the buttons), custom CSS applied, and Theme settings in the legacy Carbon
Fields format.

Copy: every setting's default or fallback and where it shows: details,
plan and bank-details steps, the confirmation step (organisation details
and joining verb), sidebar heading and stage label; plus legacy data.
Known problems, as test.fixme: Home Address Copy never shows (JOIN-162),
the day-of-month copy is unused (JOIN-163), the organisation details are
marked required but not enforced (JOIN-164).

Also: colour and rich text helpers on JoinSettingsPage, getSettings to read
many settings in one WP-CLI call, an e2e-custom-fields seed page, and
openJoinForm now starts the form afresh (it remembers its step in session
storage and the history entry).

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
- The Currency Selection Copy test used a page slug that only worked via
  WordPress's 404 guessing; the join form page constants now live in
  support.ts and multi-currency-plans.spec.ts shares them.
- JoinSettingsPage matches labels exactly, escaping pattern characters,
  so labels like '"How did you hear about us?" heading' work.
- Every Copy setting's default is checked, and every rich text setting is
  read back through Settings::get, not only checked on the form.
- The legacy Copy test checks every row it loads; loadLegacySettings
  returns them.
- Gray Color and Background Color are checked on the elements that use
  them, in the legacy test too.
- The join form's REST stubs are registered once per page, and the join
  request clickJoin holds open is let go after each test.

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 (2/5): Theme and Copy tabs Settings page regression tests (2/6): Theme and Copy tabs Oct 25, 2026
@linear-code

linear-code Bot commented Oct 25, 2026

Copy link
Copy Markdown

JOIN-173

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