Repository navigation
Conversation
…gs survive saving
… and fix the editor spec selectors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sends each WordPress Custom HTML block to beehiiv as an HTML Snippet, with a per-block "Newsletter only" option.
What changed
Requirements: PRD-07.2.02 (AC-001 to AC-022). Relay PR: https://github.com/10up/beehiiv-exensions-relay/pull/5
Decisions to review are listed in the relay PR.
Checks
tests/phpunit/BlockConverterHtmlTest.php) and the Playwright spec (tests/e2e/specs/html-snippet-block-conversion.spec.js, 22 of 22 ACs covered) were written but not run on the build machine (no Docker). The Test workflow runs them on this PR. No AC is claimed to pass until that run is read. Likely spec-side failures to check first: AC-013 (opening the block settings sidebar) and AC-021 (checks only what the plugin sends).Flags
Teamwork task: 19821634
Rerun 1
What failed. One PHPUnit test,
BlockConverterHtmlTest::test_script_and_iframe_elements_are_removed, failed on every PHP and WordPress combination (212 tests, 1 failure: expected 1 snippet, got 2). Lint passed. The E2E job had not finished.Cause. The test saved its posts with no logged-in user, so WordPress removed the
<script>tags when the post was saved and kept their text. The block that held only a script then held plain text, and was correctly sent as a snippet. The converter was right. The test setup was not.What changed. The test class now runs as an administrator, who can save unfiltered HTML, so script tags survive saving as they do for a publisher. One commit, test file only.
phpcsis clean. PHPUnit was not run on this machine.Still needs a person. Check that PHPUnit passes on the new commit. Read the E2E result when it finishes. The intake stays
executinguntil that is done.Rerun 2
contentattribute in the editor until it is edited, so the script and iframe notice never showed. The editor now falls back to the saved markup.