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

Add UI tests for simple text formatting #423

Merged
merged 7 commits into from Apr 19, 2017

Conversation

Projects
None yet
5 participants
@rachelmcr
Member

rachelmcr commented Apr 12, 2017

This PR adds a suite of UI tests for simple text formatting in the Aztec demo app.

They test each of the text formatting buttons in the toolbar (including the hr and more tags). The tests for lists are currently disabled, pending lists being fully implemented in Aztec.

Pinging @hoverduck and @catehstn for a review. :)

@rachelmcr

This comment has been minimized.

Show comment
Hide comment
@rachelmcr

rachelmcr Apr 12, 2017

Member

Also, h/t @SergioEstevao for the accessibility improvements. I used the model from wordpress-mobile/WordPress-iOS#6967 to add accessibility labels and IDs to the Aztec demo app, for use in these tests.

Member

rachelmcr commented Apr 12, 2017

Also, h/t @SergioEstevao for the accessibility improvements. I used the model from wordpress-mobile/WordPress-iOS#6967 to add accessibility labels and IDs to the Aztec demo app, for use in these tests.

@diegoreymendez diegoreymendez self-requested a review Apr 12, 2017

@diegoreymendez

This comment has been minimized.

Show comment
Hide comment
@diegoreymendez

diegoreymendez Apr 12, 2017

Contributor

Wow, nice contribution @rachelmcr! Really appreciated!

I'm adding myself as reviewer mostly to point out a few minor standardization changes I've spotted.

Contributor

diegoreymendez commented Apr 12, 2017

Wow, nice contribution @rachelmcr! Really appreciated!

I'm adding myself as reviewer mostly to point out a few minor standardization changes I've spotted.

@diegoreymendez

diegoreymendez requested changes Apr 13, 2017 edited

This is a great work!

I pointed out some minor style differences to make the code standard across our codebase. Check out the inline comments for more info on this.

The bigger issue I found is that all tests are all failing for me due to an issue with the auto-correction text prediction in iOS messing up one of the steps.

Check out this comment for a working fix for it (tested and working fine here).

Here's a video showing the problem I'm seeing.

@astralbodies

This comment has been minimized.

Show comment
Hide comment
@astralbodies
Member

astralbodies commented Apr 13, 2017

tenor

@catehstn

This is fantastic!! Super happy about this - love the tests and the a11y improvements. Thanks Rachel!

@diegoreymendez

Just wanted to leave a confirmation that my comments have been addressed appropriately.

Of course, this approval is just partial (there are still comments by @catehstn).

@rachelmcr

This comment has been minimized.

Show comment
Hide comment
@rachelmcr

rachelmcr Apr 15, 2017

Member

I updated the tests based on the feedback so far. A few notes:

  • After researching different methods for dealing with autocorrect/autocomplete, I switched to typing in numbers instead of letters/words. Numbers aren't autocorrected (yay!) so we avoid autocorrect without having to switch to pasting in the text. (I kept to one number at a time because with multiple numbers they were sometimes entered in the wrong order when running the tests.)
  • I also split up entering and selecting text in the helper functions. This should set us up well for testing a variety of scenarios where we focus on the rich text view, type some text, interact with the toolbar, and then continue typing (as seen in the added horizontal ruler and more tag tests).
  • The next step will be adding more complex tests that include both unformatted and formatted text in the rich text view, to make sure that the formatting is enabled/disabled as expected while interacting with the toolbar buttons.

@catehstn please let me know if this addresses your earlier feedback and if you see any other issues with these changes. Thanks!

Member

rachelmcr commented Apr 15, 2017

I updated the tests based on the feedback so far. A few notes:

  • After researching different methods for dealing with autocorrect/autocomplete, I switched to typing in numbers instead of letters/words. Numbers aren't autocorrected (yay!) so we avoid autocorrect without having to switch to pasting in the text. (I kept to one number at a time because with multiple numbers they were sometimes entered in the wrong order when running the tests.)
  • I also split up entering and selecting text in the helper functions. This should set us up well for testing a variety of scenarios where we focus on the rich text view, type some text, interact with the toolbar, and then continue typing (as seen in the added horizontal ruler and more tag tests).
  • The next step will be adding more complex tests that include both unformatted and formatted text in the rich text view, to make sure that the formatting is enabled/disabled as expected while interacting with the toolbar buttons.

@catehstn please let me know if this addresses your earlier feedback and if you see any other issues with these changes. Thanks!

@catehstn

catehstn approved these changes Apr 17, 2017 edited

I ran and the list ones are failing. I think comment them out and we can uncomment them when that functionality is there.

Also if you need to pause to insert multiple things, you could try waitForElementToAppear.

LGTM! Thanks :)

@diegoreymendez

This comment has been minimized.

Show comment
Hide comment
@diegoreymendez

diegoreymendez Apr 18, 2017

Contributor

@rachelmcr - Considering both reviewers gave approval: is this ready for merging?

I'm particularly interested in getting this included before the closed beta next week.

Contributor

diegoreymendez commented Apr 18, 2017

@rachelmcr - Considering both reviewers gave approval: is this ready for merging?

I'm particularly interested in getting this included before the closed beta next week.

@hoverduck

This comment has been minimized.

Show comment
Hide comment
@hoverduck

hoverduck Apr 18, 2017

FWIW I also reviewed and give the 👍 from a general testing perspective. I haven't been able to get the project to build to actually run the tests yet, but that's an unrelated problem. /shrug

hoverduck commented Apr 18, 2017

FWIW I also reviewed and give the 👍 from a general testing perspective. I haven't been able to get the project to build to actually run the tests yet, but that's an unrelated problem. /shrug

@rachelmcr rachelmcr merged commit 6c65e61 into develop Apr 19, 2017

1 check passed

Buddybuild : AztecExample/57ee5274e349f601000457c7 Build succeeded
Details

@rachelmcr rachelmcr deleted the add/uitests-simple-text-formatting branch Apr 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment