Skip to content

iOS tests: Don't double tap next to the cursor - #85481

Merged
ellatrix merged 1 commit into
trunkfrom
fix/ios-test-caret-double-tap
Oct 23, 2026
Merged

ellatrix merged 1 commit into
trunkfrom
fix/ios-test-caret-double-tap

Conversation

@ellatrix

Copy link
Copy Markdown
Member

What?

Fixes the most common failure of the iOS test that selects text across two paragraphs: "The double tap did not select a word".

Why?

The test focuses the second paragraph with a tap that leaves the caret at the start of "Delta", then double taps "Delta" 10 points from that caret. On iOS, a tap on the caret opens the edit menu, so the first touch of the double tap is sometimes taken as a tap on the caret: the menu shows "Paste, Select, Select All" and no word gets selected.

Seen by running the test 20 times on a simulator while recording the screen: 2 iterations failed this way, with the same timing as the 18 that passed. On CI the test fails about 7% of the time, and this is about 60% of those failures.

How?

  1. Focus the paragraph at the end of its line, so the caret sits after "foxtrot", away from the word the test double taps.

Testing Instructions

Run the iOS tests a number of times, for example locally with ./test/ios/run.sh -test-iterations 30, and check that the double tap selects "Delta" every time.

Use of AI Tools

Written with Claude Code.

🤖 Generated with Claude Code

The tap put the caret at the start of the word the test then double taps.
A tap on the caret opens the edit menu, so the double tap sometimes
selected nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ellatrix ellatrix added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 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>

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

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

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric dcb208a trunk % Change
timeToFirstByte 56.75 ms +6.52% -3% 57.2 ms +10.23% -2.45% -0.79%
largestContentfulPaint 96 ms +4.17% -4.17% 96 ms +4.17% -4.17% 0%
lcpMinusTtfb 37.5 ms +15.07% -5.47% 35.7 ms +8.4% -3.92% 5.04%
wpBeforeTemplate 29.78 ms +15.31% -2.38% 29.98 ms +19.15% -1.83% -0.67%
wpTemplate 22.26 ms +7.41% -5.3% 22.48 ms +5.83% -3.83% -0.98%
wpTotal 52.66 ms +7.44% -2.32% 53.36 ms +9.71% -2.42% -1.31%
wpMemoryUsage 7.68 MB +0% -0% 7.64 MB +0% -0% 0.43%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric dcb208a trunk % Change
timeToFirstByte 47.65 ms +7.24% -1.57% 47.95 ms +3.34% -3.55% -0.63%
largestContentfulPaint 106 ms +1.89% -1.89% 104 ms +1.92% -3.85% 1.92%
lcpMinusTtfb 57.1 ms +3.94% -0.96% 55.85 ms +1.7% -2.86% 2.24%
wpBeforeTemplate 27.33 ms +7.54% -2.41% 27.26 ms +3.15% -1.47% 0.26%
wpTemplate 16.9 ms +2.6% -1.18% 16.84 ms +2.26% -3.27% 0.36%
wpTotal 44.39 ms +7.64% -1.53% 44.62 ms +3.65% -3.07% -0.52%
wpMemoryUsage 6.37 MB +0% -0% 6.33 MB +0% -0% 0.53%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric dcb208a trunk % Change
mediaProcessingJpeg 411.13 ms +0.95% -1.12% 408.3 ms +0.31% -0.24% 0.69%
mediaProcessingAvif 6115.51 ms +0.09% -0.49% 6099.38 ms +0.12% -0.18% 0.26%
mediaProcessingJpegToAvif 4203.16 ms +0.19% -0% 4215.23 ms +0.21% -0.11% -0.29%

media-upload

Metric dcb208a trunk % Change
jpegUploadProcessing 1431.69 ms +35.01% -0.67% 1444.31 ms +0.55% -0.67% -0.87%
pngUploadProcessing 227.78 ms +3.42% -17.41% 219.35 ms +5.55% -13.65% 3.84%
largeJpegUploadProcessing 1430.25 ms +0.89% -0.42% 1438.32 ms +1.13% -1.09% -0.56%
multipleImageUploadProcessing 2111.93 ms +0.71% -4.23% 2052.54 ms +0.97% -7.01% 2.89%

post-editor

Metric dcb208a trunk % Change
serverResponse 410.33 ms +5.47% -8.87% 406.92 ms +3.34% -8.7% 0.84%
firstPaint 411.38 ms +27.75% -39.5% 344.95 ms +30.06% -23.99% 19.26%
domContentLoaded 1190.07 ms +1.68% -0.92% 1188.5 ms +0.61% -2.94% 0.13%
loaded 1191.21 ms +1.69% -0.89% 1189.6 ms +0.61% -2.91% 0.14%
firstContentfulPaint 514.91 ms +2.06% -16.11% 489.87 ms +2.72% -8.42% 5.11%
firstBlock 3376.82 ms +1.19% -1.11% 3356.62 ms +0.87% -3.25% 0.6%
type 20.25 ms +3.16% -6.77% 19.91 ms +2.01% -8.24% 1.71%
typeWithoutInspector 19.99 ms +2% -3.75% 20.59 ms +7.14% -1.12% -2.91%
typeWithTopToolbar 25.62 ms +2.26% -2.07% 28.77 ms +2.85% -2.05% -10.95%
typeContainer 8.66 ms +6.58% -6.93% 8.9 ms +12.58% -3.26% -2.7%
focus 126.99 ms +4.33% -4.27% 132.53 ms +6.52% -1.29% -4.18%
firstFocus 241.59 ms +0% -0% 295.29 ms +0% -0% -18.19%
selectAll 546.45 ms +3.2% -0.91% 593.72 ms +1.05% -5.26% -7.96%
listViewOpen 79.22 ms +5.79% -5.92% 77.02 ms +10.33% -5.17% 2.86%
inserterOpen 41.83 ms +9.01% -3.3% 42.25 ms +20.02% -5.8% -0.99%
inserterHover 12.54 ms +6.3% -11.24% 12.21 ms +6.22% -4.26% 2.7%
inserterSearch 9.17 ms +8.07% -3.38% 8.32 ms +8.77% -5.29% 10.22%
loadPatterns 625.4 ms +2.09% -3.9% 668.88 ms +5.69% -3.05% -6.5%
wpTotal 399.29 ms +5.62% -8.93% 396.34 ms +3.49% -9.02% 0.74%
wpMemoryUsage 14.71 MB +0% -0% 14.68 MB +0% -0% 0.24%
wpDbQueries 54.5 +0.92% -0.92% 55 +0% -1.82% -0.91%

site-editor

Metric dcb208a trunk % Change
serverResponse 268.72 ms +3.38% -0.98% 298.32 ms +3.9% -1.49% -9.92%
firstPaint 173.82 ms +9.75% -19.16% 243.21 ms +5.69% -15.42% -28.53%
domContentLoaded 850.4 ms +2.42% -1.76% 938.89 ms +1.07% -0.84% -9.42%
loaded 851.31 ms +2.45% -1.77% 939.78 ms +1.11% -0.84% -9.41%
firstContentfulPaint 352.54 ms +8.7% -1.98% 405.4 ms +4.23% -2.52% -13.04%
firstBlock 2939.18 ms +0.71% -1.49% 3312.5 ms +0.72% -1.58% -11.27%
type 14.32 ms +6.98% -1.89% 17.33 ms +1.38% -2.6% -17.37%
navigate 95.6 ms +4.08% -7.05% 103.49 ms +7.35% -1.81% -7.62%
loadPatterns 956.44 ms +4.46% -5.59% 1108.64 ms +7.79% -10.32% -13.73%
loadPages 1018.06 ms +1.21% -2.19% 1064.08 ms +2.17% -1.85% -4.32%
wpTotal 262.08 ms +3.24% -1.01% 291.44 ms +3.96% -1.57% -10.07%
wpMemoryUsage 12.73 MB +0% -0% 12.69 MB +0% -0% 0.27%
wpDbQueries 44.5 +1.12% -1.12% 44.5 +1.12% -1.12% 0%

49568a3 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.

Custom Completer: should allow newlines after multiple option completions in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 2
+ Received  + 2

  <!-- wp:paragraph -->
  <p>🫐 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
- <p>🫐 test</p>
+ <p>🍎 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
  <p>🫐 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
- <p>🫐 test</p>
+ <p>~🍎 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
  <p></p>
  <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js:466:6
Custom Completer: should not insert disabled options in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 1
+ Received  + 1

  <!-- wp:paragraph -->
- <p>Sorry, we are all out of ~g grapes.</p>
+ <p>Sorry, we are all out of 🍎 grapes.</p>
  <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js:391:7
Delete (forward) in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  -  5
+ Received  + 11

@@ -1,25 +1,31 @@
  Array [
    Object {
      "innerBlocks": Array [
        Object {
          "attributes": Object {
-           "content": "1",
+           "content": "1‸a",
          },
-         "innerBlocks": Array [
+         "innerBlocks": Array [],
+         "name": "core/list-item",
+       },
        Object {
+         "attributes": Object {
+           "content": "2",
+         },
          "innerBlocks": Array [
            Object {
              "attributes": Object {
-                   "content": "a‸2",
+               "ordered": false,
+               "values": "",
              },
-                 "name": "core/list-item",
-               },
+             "innerBlocks": Array [
                Object {
                  "attributes": Object {
                    "content": "b",
                  },
+                 "innerBlocks": Array [],
                  "name": "core/list-item",
                },
              ],
              "name": "core/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:2056:42
Regression: updating a specific option will only change its value and will not corrupt others in /test/e2e/specs/editor/various/core-settings.spec.js, passed after 1 failed attempt.
Error: expect(received).toStrictEqual(expected) // deep equality

- Expected  - 1
+ Received  + 1

  Array [
    "rewrite_rules",
-   "SERIALIZED DATA",
+   "",
  ]
    at forEach (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/core-settings.spec.js:46:26)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/core-settings.spec.js:43:35
Undo restores the post selection when another synced entity is loaded 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": 2,
+   "offset": 2,
  }

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 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  - 1
+ Received  + 1

  Array [
    Object {
-     "name": "core/column",
+     "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:1145:5
should indent and outdent level 1 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:775:3
should keep the list type when indenting an ordered list item 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 {"ordered":true} -->
  <ol class="wp-block-list"><!-- wp:list-item -->
- <li>one<!-- wp:list {"ordered":true} -->
+ <li>ne<!-- wp:list {"ordered":true} -->
  <ol class="wp-block-list"><!-- wp:list-item -->
  <li>two</li>
  <!-- /wp:list-item --></ol>
  <!-- /wp:list --></li>
  <!-- /wp:list-item --></ol>

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:916: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 replace the selection across blocks with an inline image in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 1
+ Received  + 1

@@ -1,9 +1,9 @@
  Array [
    Object {
      "attributes": Object {
-       "content": "ab",
+       "content": "b",
      },
      "name": "core/paragraph",
    },
    Object {
      "attributes": Object {

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:2372:41
should restore an older revision in /test/e2e/specs/editor/various/revisions.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 1
+ Received  + 1

  Array [
    Object {
      "attributes": Object {
-       "content": "Original content - Updated content - Autosaved",
+       "content": "Original content<ins aria-describedby=\"revision-diff-added-desc\" class=\"revision-diff-added\"> - Updated content</ins>",
      },
      "name": "core/paragraph",
    },
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/revisions.spec.js:146:5
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":36,"sizeSlug":"full","linkDestination":"none"} -->
+ <figure class="wp-block-image size-full"><img src="http://localhost:8889/wp-content/uploads/2026/10/2f812df0-9e0a-49bf-a0a7-6de827feaa98.png" alt="" class="wp-image-36"/></figure>
  <!-- /wp:image -->
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/image.spec.js:306: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

49568a3 Run

@ellatrix
ellatrix marked this pull request as ready for review October 23, 2026 15:49
@ellatrix ellatrix changed the title iOS tests: Focus the paragraph away from the word to double tap iOS tests: Don't double tap next to the cursor Oct 23, 2026
@ellatrix
ellatrix merged commit 5c954cf into trunk Oct 23, 2026
126 of 130 checks passed
@ellatrix
ellatrix deleted the fix/ios-test-caret-double-tap branch October 23, 2026 16:08
@github-actions github-actions Bot added this to the Gutenberg 24.4 milestone Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant