-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Expand mobile editor tests (#52446)
* test: Test multiple text entry editor history Expand editor history tests to cover entering text over multiple history entries. * test: List split and merge Expand tests to cover splitting lists and merging with paragraphs. * test: Highlight text with selection * test: Update inline comments The to-do note is not possible for formatted strings that result in inner HTML tags within the text input. This is because the `typeInRichText` helper does not support parsing inner HTML tags, only outer tags. This results in inaccurate cursor placement as the tags occupy indexes within the string, so the target index is off given it is based upon the visual position, i.e. the position in the rendered version of the parsed HTML, rather than the literal position in the string, i.e. taking into account what positions are occupied by HTML tags. If we want to test typing after applying formats, we should likely use e2e tests. * test: Remove redundant selectRangeInRichText argument The helper defaults to passing the second parameter (`start`) as the third parameter (`end`). Co-authored-by: Carlos Garcia <fluiddot@gmail.com> * test: Fix editor history test compatibility with new UI The undo and redo buttons relocated out of the editor and into the host app in c428fd4. * test: Wrap undo and redo actions in act to avoid warnings The undo and redo actions result in state changes for the editor, which lead to `act` warnings in the tests. This wraps the actions in `act` so that warnings are suppressed. These new undo and redo actions were introduced in c428fd4. --------- Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
- Loading branch information
Showing
3 changed files
with
191 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
d233bc2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flaky tests detected in d233bc2.
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.
🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5524343283
📝 Reported issues:
/test/e2e/specs/editor/blocks/image.spec.js
/test/e2e/specs/editor/blocks/image.spec.js