Open cameronvoell opened 3 years ago
I updated the issue based on a new decision: we'll re-enable a single classic editor test.
Hey @guarani 👋 Is "we'll re-enable a single classic editor test" still relevant?
As part of the iOS UI tests infrastructure improvements work I'm doing (see #17221), I just landed on AztecEditorScreen
and EditorAztecTests
. The test is still disabled.
Just trying to figure out whether I should put in the time to update the screen and the test, or maybe it's best to acknowledge we aren't likely to touch this because there's always going to be more pressing stuff to work on and just get rid of it.
Hi @mokagio 👋 Thanks for the ping. It's still relevant but I haven't got around to it unfortunately (I've never prioritized it above other work). With regard to the developer effort required, I was hoping to do the iOS side in less than a day. With the Android, we might not have needed a separate developer because most of the work (seems to be) needed in the shared https://github.com/wordpress-mobile/WordPressMocks library, but I'm not 100% sure of this.
If unblocking this helps your project, I'd be happy to collaborate with you to get this done ASAP (having you aware of this issue and available to answer questions would make this change easier for me to do). The next step I propose would be to update our mocks to API responses from an Atomic site (currently our mocks use a Simple site's API responses). I started work on updating the mocks in https://github.com/wordpress-mobile/WordPressMocks/pull/23, but instead of re-recording the responses I manually edited them (which in hindsight seems like a fragile approach). So I need to go back there and update the PR with actual re-recorded API responses from the site (after switching it over to Atomic).
That said, we could re-evaluate whether we really need to have classic editor tests, but I'd need to check with the team on this.
Thanks for the context @guarani, I'm glad I asked.
I'll convert the screen to the new infra, then. Hopefully it will also make your work easier whenever the time comes.
I started work on updating the mocks in wordpress-mobile/WordPressMocks#23, but instead of re-recording the responses I manually edited them (which in hindsight seems like a fragile approach). So I need to go back there and update the PR with actual re-recorded API responses from the site (after switching it over to Atomic).
Yeah, manually editing the JSON files is not ideal. Unfortunately, without proper automation that makes recording a full set of responses straightforward, that is often the most practical and sensible thing to do. 👍
Thanks @mokagio!
I'll convert the screen to the new infra, then.
Does this mean the tests will be significantly refactored? If so, I wonder if that will require the tests to be functional first (to ensure the refactor works as intended). Either way, just let me know if I can help with anything.
Does this mean the tests will be significantly refactored?
No. Based on the experience with other screens so far, the public facing API for the screen object, AztecEditorScreen
, will stay the same and the test won't need to be touched (other than maybe to add a few try
for methods that now throws
. E.g. #17221 didn't require changing any test and CI is green.
Having said that, it's hard to know if the change was correct unless we run the test. I'll have a quick look at it. If I can get it to work easily I'll do it, but I wouldn't expect anyone to go out of their way to make it run again before that.
Ok @mokagio, makes sense 👍 I'll keep an eye out for updates. Feel free to ping me once the change to the new infra is done 🙇
Unassigning myself as I'm not currently working on this.
Summary
The Classic (Aztec) editor is being deprecated for creating new posts in WPiOS. See simple sites classic editor deprecation for new posts PR here: https://github.com/wordpress-mobile/WordPress-iOS/pull/15766. Atomic, and self-hosted blogs are planned to happen afterwards.
Since users will still be able to edit existing posts, existing classic editor tests should be updated to edit an existing classic post, instead of creating a new one.
While this work is pending, classic editor tests are disabled.
Update: We decided in p9ugOq-20E-p2#comment-4395 to re-enable the classic tests to help prevent any future classic editor regressions. We'll only re-enable the simplest test,
testTextPostPublish
, since we only want a minimal test in place.