-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Expand mobile editor tests #52446
Conversation
Size Change: 0 B Total Size: 1.43 MB ℹ️ View Unchanged
|
Flaky tests detected in 5b61e8e9f67eebc18501822a610865b3b173f051. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5522771392
|
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.
LGMT 🎊 ! Awesome work on expanding the integration tests @dcalhoun 🥇 !
Expand editor history tests to cover entering text over multiple history entries.
Expand tests to cover splitting lists and merging with paragraphs.
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.
The helper defaults to passing the second parameter (`start`) as the third parameter (`end`). Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
The undo and redo buttons relocated out of the editor and into the host app in c428fd4.
5b61e8e
to
f902ca0
Compare
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.
f902ca0
to
ffb9837
Compare
What?
Expand test coverage for the mobile editor.
Why?
Reduce the likelihood of regressions.
How?
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
Expand tests to cover highlighting 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, onlyouter 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.
Testing Instructions
n/a
Testing Instructions for Keyboard
n/a
Screenshots or screencast
n/a