Blocks: Adjust local state during render instead of in effects by ellatrix · Pull Request #85814 · WordPress/gutenberg · GitHub
Skip to content

Blocks: Adjust local state during render instead of in effects - #85814

Merged
ellatrix merged 3 commits into
trunkfrom
claude/blocks-adjust-state-in-render
Oct 28, 2026
Merged

ellatrix merged 3 commits into
trunkfrom
claude/blocks-adjust-state-in-render

Conversation

@ellatrix

Copy link
Copy Markdown
Member

What?

Follow up to #85810. Removes 10 more useEffect calls in core blocks: the ones that only fix the component's own state after a render.

Fix Where
Adjust the state during render, guarded so it runs once Button and Navigation Submenu link editor closes on deselect, Table selected cell clears on deselect, Caption shows after undo and hides when empty and deselected, Group placeholder hides once the block has content or styles, Post Featured Image and Site Logo clear the temporary URL once the real one loads
Compute instead of store Playlist: the current track is the selected one, or the first track when it is gone
Reset in the handler Navigation menu selector: "Create new Menu" resets its "updating" flag in a finally, so the createNavigationMenuIsSuccess / createNavigationMenuIsError props passed through four files only for that effect are removed

Adds e2e tests for the Button link editor, the Caption and "Create new Menu" after a failed request.

Why?

Step towards not using effects in core blocks. An effect that fixes state renders once with the stale state, commits it, then renders again. For example, the Navigation Submenu link popover is not hidden by isSelected, so it is rendered for one more commit after the block is deselected.

React's "You Might Not Need an Effect" recommends computing the value, or failing that, adjusting the state during render. React then throws away that render and renders again before anything is committed. Each check here only sets the component's own state and turns false once set, so it can't loop.

Post Featured Image and Site Logo keep the state update during render: the real URL arrives when the media record loads, after the handler that sets the id, so clearing the temporary URL in the handler would flash the placeholder.

How?

  • if ( ! isSelected && isEditingURL ) { setIsEditingURL( false ); } in place of an effect on isSelected, and the same shape for the other state updates.
  • Caption: the "show after undo" check becomes "caption has text but is hidden", which drops usePrevious.
  • Playlist: selectedTrackClientId is the state; currentTrackClientId is computed from it.
  • Navigation menu selector: the effect only mattered when creating a menu failed, because the rejection skipped the handler's reset. try { await onCreateNew(); } finally { setIsUpdatingMenuRef( false ); } covers both cases.

Testing Instructions

  1. Insert a Buttons block, press Ctrl/Cmd+K to open the link editor, then select another block and select the button again. The link editor stays closed.
  2. Insert an Image, click "Add caption", then select another block. The empty caption is hidden, and "Add caption" is not pressed when the image is selected again.
  3. In an Image with a caption, click "Remove caption", then undo. The caption is back.
  4. Insert a Table, select a cell, and use "Edit table" to insert and delete rows: works as before.
  5. Insert a Group and choose a variation: the placeholder is replaced as before.
  6. Insert a Playlist with two tracks, remove the current one: the other becomes current.
  7. Set a featured image or a site logo by upload: the preview is replaced by the uploaded image.

New e2e tests: each passes on trunk, since behaviour doesn't change, and fails when the code it guards is removed:

Test output: guarded code removed, trunk
### Button reset and both Caption checks removed
  ✘  buttons.spec.js › Buttons › closes the link editor when the button is deselected
    Error: expect(locator).toBeHidden() failed
    Expected: hidden
    Received: visible
  ✘  image.spec.js › Image › should hide an empty caption when the image is deselected
    Error: expect(locator).toHaveAttribute(expected) failed
    Expected: "false"
    Error: element(s) not found
  ✘  image.spec.js › Image › should show the caption again when removing it is undone
    Error: expect(locator).toHaveText(expected) failed
    Expected: "Caption"
    Error: element(s) not found
  3 failed

### Navigation menu selector without the `finally`
  ✘  navigation-list-view.spec.js › can create a new menu again after creating one fails
    Error: expect(locator).toBeEnabled() failed
    Expected: enabled
    Received: disabled
  1 failed

### Trunk
  ✓  buttons.spec.js › Buttons › closes the link editor when the button is deselected
  ✓  image.spec.js › Image › should hide an empty caption when the image is deselected
  ✓  image.spec.js › Image › should show the caption again when removing it is undone
  ✓  navigation-list-view.spec.js › can create a new menu again after creating one fails
  4 passed

The Table change has no e2e test: selecting the table block again focuses a cell, which selects it again, so there is no keyboard path to a selected table without a selected cell.

Testing Instructions for Keyboard

Steps 1 to 3 work with the keyboard: Ctrl/Cmd+K, Tab and arrow keys to move between blocks, Ctrl/Cmd+Z to undo.

Screenshots or screencast

None: the stale state was on screen for at most one commit, so nothing visible changes.

Use of AI Tools

Written with Claude Code (Claude Opus 5.5), directed by @ellatrix.

🤖 Generated with Claude Code

ellatrix and others added 3 commits October 27, 2026 22:47
Ten effects in core blocks only fixed the component's own state after a
render: close the link editor or clear the selected table cell on deselect,
show or hide the caption, hide the group placeholder, stop the navigation
menu update, clear a temporary image URL, and fall back to the first
playlist track. They now do the same check during render, which React
supports for state that depends on props, and skips the extra render.

Adds e2e tests for the button link editor and the caption.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in its handler

Playlist computes the current track from the selected one, so it no longer
sets state during render. The navigation menu selector resets its "updating"
flag in a `finally` after creating a menu, which also covers a failed
request, so it no longer needs the creation status props.

Adds an e2e test that "Create new Menu" works again after a failed attempt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ellatrix ellatrix added [Type] Code Quality Issues or PRs that relate to code quality [Package] Block library /packages/block-library labels Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: -174 B (0%)

Total Size: 8.56 MB

📦 View Changed
Filename Size Change
build/scripts/block-library/index.min.js 401 kB -174 B (-0.04%)

86a873d Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 7b18300 trunk % Change
timeToFirstByte 44.4 ms +7.43% -4.84% 44.95 ms +10.01% -4.34% -1.22%
largestContentfulPaint 74 ms +13.51% -2.7% 76 ms +5.26% -5.26% -2.63%
lcpMinusTtfb 29.75 ms +22.02% -7.39% 27.95 ms +21.11% -4.83% 6.44%
wpBeforeTemplate 22.74 ms +13.85% -2.51% 23.07 ms +13.35% -3.73% -1.43%
wpTemplate 17.42 ms +6.95% -4.71% 17.66 ms +5.32% -5.27% -1.36%
wpTotal 41 ms +7.73% -4.85% 41.36 ms +11.1% -4.42% -0.87%
wpMemoryUsage 7.70 MB +0% -0% 7.67 MB +0% -0% 0.43%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 7b18300 trunk % Change
timeToFirstByte 37.45 ms +10.28% -2.94% 37.85 ms +7.79% -0.92% -1.06%
largestContentfulPaint 86 ms +2.33% -6.98% 84 ms +2.38% -2.38% 2.38%
lcpMinusTtfb 46.6 ms +3.65% -5.58% 45.95 ms +0.54% -4.03% 1.41%
wpBeforeTemplate 20.26 ms +9.08% -2.02% 20.29 ms +7% -1.72% -0.15%
wpTemplate 14.18 ms +7.4% -4.16% 14.7 ms +4.69% -5.85% -3.54%
wpTotal 34.38 ms +10.76% -2.27% 35.13 ms +7.49% -1.62% -2.13%
wpMemoryUsage 6.39 MB +0% -0% 6.36 MB +0% -0% 0.53%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 7b18300 trunk % Change
mediaProcessingJpeg 330.28 ms +0.32% -0.11% 324.7 ms +1.31% -0.24% 1.72%
mediaProcessingAvif 4923.92 ms +0.36% -0.77% 4873.11 ms +1.14% -0.47% 1.04%
mediaProcessingJpegToAvif 3394.61 ms +0.19% -0.2% 3401.94 ms +0.06% -0.3% -0.22%

media-upload

Metric 7b18300 trunk % Change
jpegUploadProcessing 1449.79 ms +1.37% -1.87% 1439.09 ms +0.29% -0.69% 0.74%
pngUploadProcessing 229.75 ms +4.47% -3.83% 241.82 ms +9.3% -12.54% -4.99%
largeJpegUploadProcessing 1440.11 ms +0.77% -1.52% 1424.12 ms +0.38% -0.75% 1.12%
multipleImageUploadProcessing 1504.79 ms +0.68% -1.23% 1503.01 ms +2.63% -0.56% 0.12%

post-editor

Metric 7b18300 trunk % Change
serverResponse 499.82 ms +4.88% -2.23% 480.03 ms +3.86% -0.51% 4.12%
firstPaint 337.59 ms +50.19% -24.22% 424.57 ms +16.93% -40.9% -20.49%
domContentLoaded 876.16 ms +1.42% -1.73% 865.72 ms +1.82% -3.5% 1.21%
loaded 877.33 ms +1.4% -1.69% 866.94 ms +1.81% -3.48% 1.2%
firstContentfulPaint 500.2 ms +3.64% -9.3% 491.45 ms +3.53% -13.86% 1.78%
firstBlock 3026.04 ms +1.64% -1.45% 2948.11 ms +0.86% -0.83% 2.64%
type 18.03 ms +6.88% -5.05% 17.08 ms +5.56% -1.05% 5.56%
typeWithoutInspector 19.09 ms +2.88% -6.65% 16.64 ms +3.19% -3.43% 14.72%
typeWithTopToolbar 22.64 ms +2.61% -5.74% 22.77 ms +4.08% -6.85% -0.57%
typeContainer 7.97 ms +12.55% -6.4% 7.79 ms +10.78% -5.01% 2.31%
focus 123.23 ms +9.45% -10.31% 115.27 ms +4.66% -2.59% 6.91%
firstFocus 227.88 ms +0% -0% 232.21 ms +0% -0% -1.86%
selectAll 484.1 ms +1.55% -1.61% 492.46 ms +0.37% -8.7% -1.7%
undo 31.51 ms +5.2% -5.43% 32.56 ms +7.62% -6.02% -3.22%
listViewOpen 77.93 ms +7.52% -11.1% 83.47 ms +2.66% -4.55% -6.64%
inserterOpen 42.88 ms +13.76% -10.7% 43.67 ms +10.65% -1.6% -1.81%
inserterHover 11.34 ms +11.11% -10.85% 11.64 ms +5.67% -11.08% -2.58%
inserterSearch 8.3 ms +10.6% -11.08% 8.29 ms +2.9% -11.58% 0.12%
loadPatterns 629.2 ms +4.76% -6.42% 630.34 ms +2.75% -6.12% -0.18%
wpTotal 490.04 ms +5.01% -2.24% 470.44 ms +4.04% -0.5% 4.17%
wpMemoryUsage 14.75 MB +0% -0% 14.72 MB +0% -0% 0.24%
wpDbQueries 55 +0% -1.82% 55 +0% -1.82% 0%

site-editor

Metric 7b18300 trunk % Change
serverResponse 489.09 ms +2.27% -4.97% 494.93 ms +2.47% -6.48% -1.18%
firstPaint 269.46 ms +4.29% -7.76% 246.33 ms +8.1% -4.99% 9.39%
domContentLoaded 899.84 ms +1.29% -0.74% 883.79 ms +0.91% -2.14% 1.82%
loaded 901.08 ms +1.27% -0.77% 884.79 ms +0.93% -2.14% 1.84%
firstContentfulPaint 500.23 ms +1.14% -1.1% 492.86 ms +4.1% -2.37% 1.5%
firstBlock 3961.11 ms +0.36% -0.28% 3904.06 ms +0.53% -1.49% 1.46%
type 18.19 ms +8.91% -6.16% 18.4 ms +13.04% -8.97% -1.14%
navigate 116.44 ms +10.93% -1.24% 110.31 ms +11.63% -3.14% 5.56%
loadPatterns 1161.35 ms +8.37% -4.26% 1121.46 ms +4.8% -3.16% 3.56%
loadPages 982.54 ms +1.29% -2.45% 948.58 ms +4.98% -1.67% 3.58%
wpTotal 479.88 ms +2.25% -5.13% 485.41 ms +2.49% -6.61% -1.14%
wpMemoryUsage 12.77 MB +0% -0% 12.74 MB +0% -0% 0.24%
wpDbQueries 44 +2.27% -0% 44 +2.27% -0% 0%

86a873d Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

As a user I want to be able to add multiple close buttons so that users can close the overlay from different positions in /test/e2e/specs/site-editor/navigation-overlay-template-part.spec.js, passed after 1 failed attempt.
Error: expect(locator).toHaveCount(expected) failed

Locator:  getByRole('button', { name: 'Close' })
Expected: 2
Received: 1
Timeout:  5000ms

Call log:
  - Expect "toHaveCount" getByRole('button', { name: 'Close' }) with timeout 5000ms
  - waiting for getByRole('button', { name: 'Close' })
    14 × locator resolved to 1 element
       - unexpected value "1"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-overlay-template-part.spec.js:228:33
Undo restores the post selection when another synced entity is loaded (RTC WebSocket) in /test/e2e/specs/editor/collaboration/collaboration-undo-redo.spec.ts, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 2
+ Received  + 2

  Object {
    "attributeKey": "content",
    "blockIndex": 0,
    "content": "abcdef",
-   "endOffset": 3,
-   "offset": 3,
+   "endOffset": 6,
+   "offset": 6,
  }

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/collaboration-undo-redo.spec.ts:363:5
can be converted to a quote in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

@@ -1,9 +1,9 @@
  <!-- wp:quote -->
  <blockquote class="wp-block-quote"><!-- wp:list -->
  <ul class="wp-block-list"><!-- wp:list-item -->
- <li>one</li>
+ <li>ne</li>
  <!-- /wp:list-item -->

  <!-- wp:list-item -->
  <li>two</li>
  <!-- /wp:list-item --></ul>

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:436:52
should change the indented list type in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('role=toolbar[name="Block tools"i]').locator('role=button[name="Indent"]')

    at Editor.clickBlockToolbarButton (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/editor/click-block-toolbar-button.ts:17:15)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:727:3
should create paragraph on Enter in quote block in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for getByRole('option', { name: 'List', exact: true })

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:751:67
should gradually multi-select in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 3
+ Received  + 7

  Array [
    Object {
-     "name": "core/column",
+     "attributes": Object {
+       "content": "1",
+       "dropCap": false,
      },
-   Object {
-     "name": "core/column",
+     "clientId": "37c56f94-abe4-466c-a290-c315a8b2cdcd",
+     "innerBlocks": Array [],
+     "isValid": true,
+     "name": "core/paragraph",
    },
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:1200:5
should indent and outdent a list item when its content is fully selected in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 7
+ Received  + 7

  <!-- wp:list -->
  <ul class="wp-block-list"><!-- wp:list-item -->
- <li>a<!-- wp:list -->
- <ul class="wp-block-list"><!-- wp:list-item -->
- <li>b</li>
+ <li></li>
+ <!-- /wp:list-item --></ul>
- <!-- /wp:list-item --></ul>
+ <!-- /wp:list -->
+
- <!-- /wp:list --></li>
- <!-- /wp:list-item --></ul>
+ <!-- wp:paragraph -->
+ <p>b</p>
- <!-- /wp:list -->
+ <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:819:52
should indent with Space and outdent with Shift+Space at the start in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 5
+ Received  + 1

  <!-- wp:list -->
  <ul class="wp-block-list"><!-- wp:list-item -->
- <li>a<!-- wp:list -->
- <ul class="wp-block-list"><!-- wp:list-item -->
- <li>b</li>
- <!-- /wp:list-item --></ul>
- <!-- /wp:list --></li>
+ <li> b</li>
  <!-- /wp:list-item --></ul>
  <!-- /wp:list -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:875:52
should merge a following sibling list into the outermost list with Delete from a nested item (#77245) in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 2
+ Received  + 2

@@ -8,11 +8,11 @@
          "innerBlocks": Array [
            Object {
              "innerBlocks": Array [
                Object {
                  "attributes": Object {
-                   "content": "b‸",
+                   "content": "b",
                  },
                  "name": "core/list-item",
                },
              ],
              "name": "core/list",
@@ -25,11 +25,11 @@
    },
    Object {
      "innerBlocks": Array [
        Object {
          "attributes": Object {
-           "content": "1",
+           "content": "‸1",
          },
          "innerBlocks": Array [
            Object {
              "innerBlocks": Array [
                Object {

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:2854:41
should partially select with shift + click in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  -  1
+ Received  + 11

  Array [
    Object {
      "attributes": Object {
-       "content": "<strong>1</strong>|2",
+       "content": "<strong>1</strong>[",
+       "dropCap": false,
+     },
+     "innerBlocks": Array [],
+     "name": "core/paragraph",
+   },
+   Object {
+     "attributes": Object {
+       "content": "]2",
+       "dropCap": false,
      },
+     "innerBlocks": Array [],
      "name": "core/paragraph",
    },
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:1599:41
should select by dragging into separator in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
TimeoutError: locator.hover: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('[name="editor-canvas"]').contentFrame().getByRole('document', { name: 'Block: Paragraph' })
    - locator resolved to <p role="document" data-empty="false" aria-multiline="true" aria-readonly="false" data-title="Paragraph" contenteditable="true" data-type="core/paragraph" aria-label="Block: Paragraph" data-wp-block-attribute-key="content" id="block-8ecb084c-5902-4086-b24f-4c1e1150f6ad" data-block="8ecb084c-5902-4086-b24f-4c1e1150f6ad" class="block-editor-rich-text__editable block-editor-block-list__block wp-block wp-block-paragraph rich-text">1</p>
  - attempting hover action
    2 × waiting for element to be visible and stable
      - element is visible and stable
      - scrolling into view if needed
      - done scrolling
      - <button type="button" tabindex="-1" draggable="true" aria-label="Drag" class="components-button block-editor-block-mover__drag-handle is-next-40px-default-size has-icon">…</button> from <div tabindex="-1" data-wp-c16t="true" data-wp-component="Popover" class="components-popover block-editor-block-popover block-editor-block-list__block-popover is-positioned is-unstyled">…</div> subtree intercepts pointer events
    - retrying hover action
    - waiting 20ms
    2 × waiting for element to be visible and stable
      - element is visible and stable
      - scrolling into view if needed
      - done scrolling
      - <button type="button" tabindex="-1" draggable="true" aria-label="Drag" class="components-button block-editor-block-mover__drag-handle is-next-40px-default-size has-icon">…</button> from <div tabindex="-1" data-wp-c16t="true" data-wp-component="Popover" class="components-popover block-editor-block-popover block-editor-block-list__block-popover is-positioned is-unstyled">…</div> subtree intercepts pointer events
    - retrying hover action
      - waiting 100ms
    17 × waiting for element to be visible and stable
       - element is visible and stable
       - scrolling into view if needed
       - done scrolling
       - <button type="button" tabindex="-1" draggable="true" aria-label="Drag" class="components-button block-editor-block-mover__drag-handle is-next-40px-default-size has-icon">…</button> from <div tabindex="-1" data-wp-c16t="true" data-wp-component="Popover" class="components-popover block-editor-block-popover block-editor-block-list__block-popover is-positioned is-unstyled">…</div> subtree intercepts pointer events
     - retrying hover action
       - waiting 500ms

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:2172:5
should split into two with paragraph and merge lists in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

@@ -1,8 +1,8 @@
  <!-- wp:list -->
  <ul class="wp-block-list"><!-- wp:list-item -->
- <li>one</li>
+ <li>e</li>
  <!-- /wp:list-item -->

  <!-- wp:list-item -->
  <li></li>
  <!-- /wp:list-item -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:502:52
should undo without broken temporary state in /test/e2e/specs/editor/blocks/image.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 2
+ Received  + 2

- <!-- wp:image -->
- <figure class="wp-block-image"><img alt=""/></figure>
+ <!-- wp:image {"id":25,"sizeSlug":"full","linkDestination":"none"} -->
+ <figure class="wp-block-image size-full"><img src="http://localhost:8891/wp-content/uploads/2026/10/44c0390f-74b4-4a2f-a88f-354c90f4b969.png" alt="" class="wp-image-25"/></figure>
  <!-- /wp:image -->
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/image.spec.js:432:49
should update the URL from the last navigation if only varies in the URL fragment in /test/e2e/specs/interactivity/router-navigate.spec.ts, passed after 1 failed attempt.
Error: expect(locator).toHaveText(expected) failed

Locator:  getByTestId('title')
Expected: "Link 1"
Received: "Main"
Timeout:  5000ms

Call log:
  - Expect "toHaveText" getByTestId('title') with timeout 5000ms
  - waiting for getByTestId('title')
    14 × locator resolved to <h2 data-testid="title">Main</h2>
       - unexpected value "Main"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/interactivity/router-navigate.spec.ts:160:25

86a873d Run

@Mamaduka Mamaduka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Love this. Thank you, Ella!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Block library /packages/block-library [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants