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
Testing: Add publish tests using the block editor #11696
Conversation
WordPress/WordPressUITests/Screens/Editor/BlockEditorScreen.swift
Outdated
Show resolved
Hide resolved
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.
The code LGTM! and the tests work pretty well! 👍🏽 I just have a small nitpick and a case I think we should cover..
There's something I noticed when I was initially testing this out, running the Gutenberg tests before the Aztec tests led to a failure as a result of the block editor still being on... I cleaned the build folder and went again and now I noticed that each time the app was being reinstalled so this couldn't be reproduced anymore(weird but I don't think that's the expected behavior). To reproduce this a simple change of EditorGutenbergTests
to EditorAGutenbergTests
can do the trick... I know in the current scenario unless the tests are ran separately this shouldn't happen or but I think this can also occur if the app isn't re-installed and the BlockEditor is still on.. I'm thinking we can just always ensure the block editor is off for the AztecEditor test in a similar approach to what's being done in the BlockEditor test...
The nitpick I had is that we're using
super.setUp()
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false
let app = XCUIApplication()
app.launchArguments = ["NoAnimations"]
app.activate()
// Media permissions alert handler
systemAlertHandler(alertTitle: "“WordPress” Would Like to Access Your Photos", alertButton: "OK")
in the setUp
for most of the tests and probably will use it in future tests as well, any chance we could reuse that block of code in a function?
Good call, that's an easy thing to add. 👍
Yeah, I hadn't thought about that. I'll take a look at what makes the most sense there for reusing all or most of that block of code. Thanks! |
Generated by 🚫 dangerJS |
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.
LGTM! 🚢
This PR adds a new Gutenberg test suite with two publish flow tests using the block editor. These are the same publish tests we already had running for Aztec (which are now in a single Aztec test suite).
This PR also switches the main navigation test to use the block editor instead of Aztec. (The navigation itself is the same, but we have to define which editor we expect to open after tapping the editor button in the bottom nav bar.)
Note: For now, the block editor tests only run in English. We'll need to look at either adding test IDs to Gutenberg or making the localizable strings from Gutenberg accessible to these tests (less stable) to run them in other device languages.
To test:
~/.mobile-secrets/iOS/WPiOS/WPUITestCredentials.swift
(based on the template at/WordPressUITests/WPUITestCredentials-Template.swift
).LoginTests
in theWordPressUITests
target.Update release notes:
RELEASE-NOTES.txt
.