-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Prevent Homepage from being deleted or moved to a draft #14061
Conversation
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
You can test the changes on this Pull Request by downloading the APK here. |
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.
Nice work @chipsnyder 👍
Tested the App on an Pixel 2 XL with Android 11 and behaves as expected.
The code changes are consistent and LGTM 🎉
Regarding the failing checks:
-
The
CreatePageListItemActionsUseCaseTest
tests should be ok by removing theMOVE_TO_DRAFT, MOVE_TO_TRASH
values from the expected actions. It would be nice if we added a couple more tests to verify the new if branch in theCreatePageListItemActionsUseCase
. -
The lint check failure has to do with the introduction of Detekt and a fix is already available in
develop
11e28f3
to
5f93078
Compare
Thanks for the help @antonis! I totally forgot to come back and validate these checks before I logged off for the day. I updated the tests that check the available settings for Homepages and it looks like a test already existed for pages that aren't homepages. |
The installable build is still failing but that should be resolved by #14082 once that's available |
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.
Thanks for the help @antonis! I totally forgot to come back and validate these checks before I logged off for the day. I updated the tests that check the available settings for Homepages and it looks like a test already existed for pages that aren't homepages.
Thank you for the changes @chipsnyder 👍
LGTM 🎉
Fixes: #13908
To test:
📓 Make sure your site is set to have a Static Homepage
Attempt to delete Homepage
...
on the HomepageMove to Trash
option📓 If the Homepage has been moved out of the Published filter then the
Move to Trash
option will still be there. The site is already broken so no reason to restrict it.Screenshot
Attempt to move Homepage to Draft - Page List
📓 This doesn't apply if you've trashed your Homepage.
...
on the HomepageMove to Draft
Screenshot
Attempt to move Homepage to Draft - Page Settings
...
in the top right-hand cornerPage Settings
Status
📓 On iOS Private is handled by a different menu.
Screenshot
Attempt to delete Page
...
on a page that is not the HomepageMove to Trash
optionMove to Trash
Attempt to move Page to Draft - Page List
...
on a page that is not the HomepageMove to Draft
Attempt to move Page to Draft - Page Settings
...
in the top right-hand cornerPage Settings
Status
PR submission checklist:
RELEASE-NOTES.txt
if necessary.