Conversation
Generated by 🚫 dangerJS |
362a254 to
8168ca0
Compare
Use the new emulators and delete the old registry management code
735f244 to
4dc1138
Compare
Gemfile.lock
Outdated
There was a problem hiding this comment.
This is just for the purposes of reviewing this PR. Assuming we're happy with it, I can submit a new PR to adjust this for the tag, or can tag a new release in https://github.com/wordpress-mobile/release-toolkit
4dc1138 to
d245068
Compare
WordPress/src/androidTest/java/org/wordpress/android/ui/screenshots/WPScreenshotTest.java
Outdated
Show resolved
Hide resolved
WordPress/src/androidTest/java/org/wordpress/android/ui/screenshots/WPScreenshotTest.java
Outdated
Show resolved
Hide resolved
Fix a merge issue Use the new screenshot filenames Ignore tmp folder Implement compositing adjustments Remove unused imports
01a02e9 to
193b572
Compare
6f60f27 to
d10d321
Compare
There was a problem hiding this comment.
I'm getting a compile error here, did you mean
| this.__wpLogout(); | |
| this.wpLogout(); |
There was a problem hiding this comment.
Ah – good catch! My bad.
That's fixed now, but the reason I brought in the old login / logout methods was because the new ones were failing for screenshots – in particular in other languages (Thai and Japanese seemed especially problematic). I spent some time with it and couldn't sort out why. I figured that could be something for a future PR?
WDYT?
There was a problem hiding this comment.
Oh I meant to ask that, I'm not sure why they'd be failing, I actually didn't test on other languages so I'm not quite aware about what's happening, I'll look into it though thanks for pointing that out 👍🏽
Fix method names
Seems to make running the screenshot capture process less flaky
d10d321 to
173d132
Compare
There was a problem hiding this comment.
@jkmassel this looks good to go to me! I left a few comments around the login steps. I did give it a run myself and got the following error though
[18:23:36]: fastlane finished with errors
[!] Tests failed for locale de-DE on device emulator-5554
I'm thinking this might be something I'm missing with my emulators though right?
| @@ -59,65 +55,112 @@ public void wPScreenshotTest() { | |||
| Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy()); | |||
|
|
|||
| wpLogin(); | |||
There was a problem hiding this comment.
Small issue but this method doesn't check if the emulator isn't logged in already, is it worth doing that check here as well?
| } | ||
|
|
||
| waitForRecyclerViewToStopReloading(); | ||
| private void tmpWpLogout() { |
There was a problem hiding this comment.
I think this will have a problem if the app was already signed in with a self-hosted account. I had to handle that differently
There was a problem hiding this comment.
For sure – as part of the screenshot generation, the device is wiped each time, so we don't need to worry about folks being signed in for this particular use case.
That said, probably a good case to handle for the general-purpose logout method.
There was a problem hiding this comment.
Cool! That also makes my previous note void as well 🙂
| // a different thread than the UI, the UI sometimes reports completion of an operation before repainting the | ||
| // screen to reflect the change. Delaying by one frame ensures we're not taking a screenshot of a stale UI. | ||
| public static void waitOneFrame() { | ||
| idleFor(17); |
There was a problem hiding this comment.
Maybe give this some indentation? 😄
|
|
||
| // Click in the post title editor and ensure the caret is at the end of the title editor | ||
| focusEditPostTitle(); | ||
| // focusEditPostTitle(); |
There was a problem hiding this comment.
Why is this commented out? If its not needed anymore it would be nice to remove 👍
There was a problem hiding this comment.
Good call – removed.
fastlane/SCREENSHOT_DEVICE_SETUP.md
Outdated
| ##### To adjust device parameters: | ||
|
|
||
| Edit the device in Android Studio, and adjust to the specifications you'd like to use. Once you save the device, it'll make a new hardware profile with the settings you just provided. Right-click on that hardware profile, and choose "export". When merging, it can be useful to use the diff view to ensure that only the fields you meant to change are actually being changed – as a for-instance, Android Studio loves to try to overwrite your `sdcard.size`, and that change can almost always be discarded. | ||
| Emulators can be entirely defined within their `.ini` file. Copying the `.ini` file into the correct directory (along with _another_ `.ini` file to point to it) is all that's needed – if it exists, the Android SDK will happily build a fresh new virtual device based on it. |
There was a problem hiding this comment.
It seems like the rebuild_screenshot_devices lane still exists for generating the devices. Is there more we can document about that here?
There was a problem hiding this comment.
Sure can (and sure have) – let me know if there's anything else you have questions about, and I'm happy to write it up!
No description provided.