Skip to content

Add manual Prepublish integration tests - #65

Merged
MortenFriisSiteImprove merged 1 commit into
masterfrom
test/prepublish-workflows
Sep 10, 2026
Merged

MortenFriisSiteImprove merged 1 commit into
masterfrom
test/prepublish-workflows

Conversation

@MortenFriisSiteImprove

Copy link
Copy Markdown
Contributor

Prepublish needs repeatable coverage for the draft-content and styling concerns raised in #64. This adds manual browser and WordPress integration tests, with readable Given/When/Then steps and failure screenshots.

  • Verify never-published drafts and unpublished autosaves reach the plugin’s SDK handoff while anonymous visitors cannot retrieve the new content.
  • Exercise same-origin and separate-origin Public URL settings through the toolbar and registered callback in Chromium and Firefox. Check preview parameters, PHP nonce validation, URL/token handoff, stylesheet references, inline styles, and cleanup.
  • Add a disposable WordPress/PHP environment, pinned npm dependencies, scenario documentation, and downloadable HTML reports retained for 14 days.

Both new workflows use only workflow_dispatch. The optional plugin_ref input selects the plugin version independently of the test code; use refs/pull/64/head to test that fix. A blank input tests the workflow commit’s plugin, so the regression cases are expected to fail against current master until #64 is merged. The workflows record the resolved plugin commit and require no Siteimprove secrets.

Validation: 30 browser tests and 18 WordPress tests passed locally against #64 (a23af8519861f674d700cbe4fe183817f47458dc). The fresh-checkout run exposed a login-autofocus race; the tests now wait for WordPress’s initial focus before typing. Readiness and split-origin revision capture were revalidated in both browsers after that adjustment. Failure screenshot/report attachment was verified with temporary intentional failures in both browsers. The SDK is simulated; authenticated Siteimprove scans and report rerenders remain pending account access. Editor UI, additional WordPress/PHP versions, subdirectory installs and multisite are future coverage.

Production plugin files and existing release/deployment workflows are unchanged. The commit includes [skip ci] to avoid starting existing push/PR workflows during review. No GitHub workflow has been dispatched.

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.

1 participant