Skip to content

fix/3708 test failure#3709

Open
Arukuen wants to merge 3 commits into
developfrom
fix/3708-test-failure
Open

fix/3708 test failure#3709
Arukuen wants to merge 3 commits into
developfrom
fix/3708-test-failure

Conversation

@Arukuen
Copy link
Copy Markdown
Contributor

@Arukuen Arukuen commented May 21, 2026

fixes #3708

  1. Updated the PHP version of the test from 7.3 to 7.4 for Wordpress 7.0.
  2. Add the content and color attribute to the inserted text similar to how the previous tests did it (simulating like a user).
image
  1. Failed Compressed Size action is caused by the workflow that uses an outdated branch v3 (which does not have the build:no-translate script). The fix is to use the updated develop branch instead.

Summary by CodeRabbit

  • Tests

    • Improved Block Editor e2e test to more explicitly configure a text block in the editor and validate frontend rendering and PHP error behavior.
  • Chores

    • Updated CI workflows to use PHP 7.4 and adjusted the secondary repository checkout reference.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 72d81d61-9afc-475a-8068-f2a90095207d

📥 Commits

Reviewing files that changed from the base of the PR and between 7095df3 and ffa9164.

📒 Files selected for processing (1)
  • .github/workflows/compressed-diff.yml

📝 Walkthrough

Walkthrough

Bump Playwright CI PHP matrix from 7.3→7.4, change a secondary checkout ref from v3develop, and modify a block-editor e2e test to explicitly set block text and hex color before frontend assertions.

Changes

CI and E2E Test Updates

Layer / File(s) Summary
Playwright PHP matrix bump
.github/workflows/playwright.yml
Playwright test matrix PHP version updated from 7.3 to 7.4.
Compressed-diff checkout ref update
.github/workflows/compressed-diff.yml
Checkout ref changed from v3 to develop for the secondary repository.
Block Editor E2E Test Configuration
e2e/tests/block-editor.spec.ts
E2E test now opens the Settings panel, fills the block textbox with test, sets the block text color via the palette and hex input to ff0000, and closes the color picker; prior attribute-verification step removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit peeks at CI and tests today,
Tweaks PHP lines and changes the play,
Hex set to ff0000 with a cheerful hop,
Checkouts point to develop — no stop,
Hooray, the pipeline hums away! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix/3708 test failure' clearly describes the main change - fixing a test failure from issue #3708 - and is directly related to the primary objective of the PR.
Linked Issues check ✅ Passed The PR addresses issue #3708 by updating PHP version in Playwright CI matrix (7.3→7.4), adding block content/color attributes to simulate user input, and fixing workflow references (v3→develop branch).
Out of Scope Changes check ✅ Passed All changes directly address the objectives from issue #3708: PHP/WordPress test compatibility, test simulation accuracy, and workflow branch references. No out-of-scope changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/3708-test-failure

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

🤖 Pull request artifacts

file commit
pr3709-stackable-3709-merge.zip ffa9164

github-actions Bot added a commit that referenced this pull request May 21, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
e2e/tests/block-editor.spec.ts (1)

108-120: ⚡ Quick win

Consider extracting duplicate block configuration logic.

The code at lines 108-120 duplicates the block setup logic from lines 69-81 (opening Settings, filling text, setting color, closing color picker). Extracting this into a shared helper function would improve maintainability and ensure consistency.

♻️ Example helper function
async function configureTextBlock(
  editor: Editor,
  page: Page,
  text: string,
  hexColor: string
) {
  const settings = page.getByLabel('Settings', { exact: true })
  
  if (await settings.getAttribute('aria-pressed') === 'false') {
    await settings.click()
  }
  
  await editor.canvas
    .locator('[data-type="stackable/text"] > .stk-block-text > p[role="textbox"]')
    .fill(text)
  await page
    .locator('.stk-color-palette-control .stk-control-content > .components-dropdown > .components-button')
    .first()
    .click()
  await page.getByLabel('Hex color').fill(hexColor)
  await editor.canvas.locator('body').click()
}

Then both tests could call: await configureTextBlock(editor, page, 'test', 'ff0000')

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@e2e/tests/block-editor.spec.ts` around lines 108 - 120, Duplicate block setup
(opening Settings, filling text, setting color, closing color picker) should be
extracted into a shared helper; add a function named configureTextBlock(editor:
Editor, page: Page, text: string, hexColor: string) that performs the existing
steps (toggle Settings if aria-pressed is 'false', fill the textbox at the
selector '[data-type="stackable/text"] > .stk-block-text > p[role="textbox"]',
open the color dropdown via '.stk-color-palette-control .stk-control-content >
.components-dropdown > .components-button' .first(), fill the 'Hex color' input,
and click 'body' on editor.canvas to close the picker), then replace the
duplicated blocks in the spec with await configureTextBlock(editor, page,
'test', 'ff0000'); ensure the helper is exported/available in the test file and
include any necessary Editor/Page type imports.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@e2e/tests/block-editor.spec.ts`:
- Around line 108-120: Duplicate block setup (opening Settings, filling text,
setting color, closing color picker) should be extracted into a shared helper;
add a function named configureTextBlock(editor: Editor, page: Page, text:
string, hexColor: string) that performs the existing steps (toggle Settings if
aria-pressed is 'false', fill the textbox at the selector
'[data-type="stackable/text"] > .stk-block-text > p[role="textbox"]', open the
color dropdown via '.stk-color-palette-control .stk-control-content >
.components-dropdown > .components-button' .first(), fill the 'Hex color' input,
and click 'body' on editor.canvas to close the picker), then replace the
duplicated blocks in the spec with await configureTextBlock(editor, page,
'test', 'ff0000'); ensure the helper is exported/available in the test file and
include any necessary Editor/Page type imports.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: df1f660c-5634-481d-bf5a-c43596c33419

📥 Commits

Reviewing files that changed from the base of the PR and between f74f44e and 7095df3.

📒 Files selected for processing (2)
  • .github/workflows/playwright.yml
  • e2e/tests/block-editor.spec.ts

@DAnn2012
Copy link
Copy Markdown
Contributor

Hello @Arukuen

I'd like to ask you, please, to also take a look at my pull request #3655.

Thank you.

github-actions Bot added a commit that referenced this pull request May 21, 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.

Github action tests failure: PHP 7.3 and 8.2 with WP latest

2 participants