Skip to content

Comments

test: Add iOS E2E tests (XCUITest)#319

Merged
dcalhoun merged 21 commits intotrunkfrom
test/ios-e2e-tests
Feb 24, 2026
Merged

test: Add iOS E2E tests (XCUITest)#319
dcalhoun merged 21 commits intotrunkfrom
test/ios-e2e-tests

Conversation

@dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Feb 15, 2026

What?

Adds XCUITest-based E2E tests for the iOS Demo app, covering editor loading, content interaction, 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 3 tests:
    • testEditorWebViewBecomesVisible — verifies the editor WebView loads
    • testUndoRedoAfterTyping — types in title and content, verifies content via code editor, undoes, then redoes and verifies state
    • testInsertImageBlock — verifies the native block inserter adds an image block
  • Adds two Makefile targets:
    • make test-ios-e2e — runs against the production build
    • make test-ios-e2e-dev — runs against the Vite dev server via TEST_RUNNER_GUTENBERG_EDITOR_URL
  • Adds a Buildkite CI step that downloads the build artifact and runs make test-ios-e2e

Testing Instructions

  1. Run make test-ios-e2e to test against the production build (requires Xcode and a simulator)
  2. Or start make dev-server in one terminal, then run make test-ios-e2e-dev in another to test against the dev server
  3. All 3 tests should pass in both modes

@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.
Add `make test-ios-e2e-dev` target that runs iOS E2E tests against the
Vite dev server for faster local iteration without a production build.
Uses the `TEST_RUNNER_` xcodebuild convention to forward
`GUTENBERG_EDITOR_URL` to the test runner process.
Align test-ios-e2e with test-e2e by using a conditional build instead
of a Make dependency, avoiding unnecessary npm and translation steps
when dist/ already exists. Add corresponding Buildkite pipeline step.
@dcalhoun dcalhoun marked this pull request as ready for review February 24, 2026 19:49
@dcalhoun dcalhoun requested a review from crazytonyli February 24, 2026 19:49
@dcalhoun dcalhoun enabled auto-merge (squash) February 24, 2026 19:49
@dcalhoun dcalhoun disabled auto-merge February 24, 2026 19:50
@dcalhoun dcalhoun merged commit 348ad35 into trunk Feb 24, 2026
14 checks passed
@dcalhoun dcalhoun deleted the test/ios-e2e-tests branch February 24, 2026 22:54
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.

2 participants