Draft
Conversation
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.
47d5e0a to
090bebd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?
EditorInteractionUITesttest suite with 4 tests:testEditorWebViewBecomesVisible— verifies the editor WebView loadstestCodeEditorToggleWithContent— types in the visual editor, toggles to code editor, verifies HTMLtestInsertImageBlock— uses the block inserter to add an image blocktestUndoRedoAfterTyping— types content, undoes, then redoes and verifies stateGutenbergUITests) for running the testsmake test-ios-e2eMakefile target and documentation indocs/code/testing.mdEditorView.swiftfor test discoverabilityTesting Instructions
make test-ios-e2e(requires Xcode and a simulator)