-
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
[RNMobile] - E2E Simplify heading and lists blocks functions #40670
Merged
Merged
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
8b70472
update tests using paragraph, heading and list blocks
jostnes c5bf57b
fix slash inserter tests to work in ci
jostnes 43d780b
lint fixes
jostnes 6d0a319
wait for ordered list to appear
jostnes 39c8870
lint fixes
jostnes f38d259
extra click only on local env
jostnes bd2eea4
wait to get backspace click reflected
jostnes 4cf9f9e
re-add extra click only for local env
jostnes 077a69c
add wait to wait for backspace key to be reflected
jostnes a6bfbf7
lint fixes
jostnes 46273a8
break function, set position to get list block
jostnes 6a9dae2
lint fixes
jostnes e3bc393
use correct params, update function name
jostnes 4f6917e
lint fixes
jostnes 85c407c
make maxIteration a parameter for isElementVisible
jostnes d1af907
update xpath for list block
jostnes 0077156
utilize waitForVisible for isElementVisible
jostnes 4c7f918
lint fixes
jostnes 0da6fc5
Merge branch 'trunk' into rnmobile/heading-list-blocks-test-update
jostnes 58d9e90
add wait to getNumberOfParagraphBlocks and update xpath for android l…
jostnes 92ffc5e
update edit text xpath to be read from any level
jostnes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
Oops, something went wrong.
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.
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.
I'd like to suggest relying on Jest snapshots for the expectations of tests, this is something we could apply on every test actually. We could have something like this:
This would ensure that we produced the right HTML output after the test. Here is an example of the snapshot file:
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.
I'm thinking that we might consider covering this in a future PR. It would also help with reducing considerably the test data fixture file.
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.
I'm open to trying that and looks like it's used quite a bit already in the integration tests. But yeah I wouldn't want to cover it in this PR and better to be in a separate PR, I think this would also make the assertions more consistent (there are a few E2E tests that does not check the HTML output).
Though one thing I'm unsure of is if we can use Jest with Appium (not tested).
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.
We are using Jest for running the tests (reference) so there shouldn't be any problem. The snapshots are taken from the output HTML retrieved by the
getHtmlContent
helper which returns a string. Since the logic will be handled on the Jest side, I don't foresee any potential conflict due to using Appium.