Skip to content

test: Add iOS E2E tests (XCUITest)#319

Draft
dcalhoun wants to merge 16 commits intotrunkfrom
test/ios-e2e-tests
Draft

test: Add iOS E2E tests (XCUITest)#319
dcalhoun wants to merge 16 commits intotrunkfrom
test/ios-e2e-tests

Conversation

@dcalhoun
Copy link
Member

What?

Adds XCUITest-based E2E tests for the iOS Demo app, covering editor loading, content interaction, code editor toggling, block insertion, and undo/redo.

Why?

Native iOS UI tests exercise the full integration stack — app launch, WebView lifecycle, native-to-JS bridge communication — that Playwright E2E tests cannot reach.

How?

  • Adds an EditorInteractionUITest test suite with 4 tests:
    • testEditorWebViewBecomesVisible — verifies the editor WebView loads
    • testCodeEditorToggleWithContent — types in the visual editor, toggles to code editor, verifies HTML
    • testInsertImageBlock — uses the block inserter to add an image block
    • testUndoRedoAfterTyping — types content, undoes, then redoes and verifies state
  • Adds a shared Xcode scheme (GutenbergUITests) for running the tests
  • Adds make test-ios-e2e Makefile target and documentation in docs/code/testing.md
  • Adds accessibility identifiers to EditorView.swift for test discoverability
  • Disables parallel simulator testing (overhead outweighs benefit at this test count)

Testing Instructions

  1. Run make test-ios-e2e (requires Xcode and a simulator)
  2. All 4 tests should pass

@dcalhoun dcalhoun added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Feb 15, 2026
Move reusable helper methods (navigateToEditor, typeInTitle,
insertBlock, typeInContent) and the XCUIElement.waitForEnabled
extension into a dedicated EditorUITestHelpers enum so new test
files can share them without duplication.
Add helpers to read and assert on actual editor content by switching to
Code Editor mode and reading textarea values. Update undo/redo and code
editor toggle tests to verify content survives operations.
Replace separate assertTitle/assertContentContains helpers (which each
toggled to Code Editor independently) with a unified assertContent
helper that reads both values in one toggle.
The mode toggle is now exercised implicitly by the content assertion
helpers used in testUndoRedoAfterTyping, making the dedicated
testCodeEditorToggleWithContent test superfluous.
Assert that the undone text is no longer present in the editor content
between the undo and redo steps.
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

Comments