Skip to content

Make SiteModel params nullable on WPMainActivity VM event handler methods#12794

Merged
renanferrari merged 1 commit intofix/login-connected-testsfrom
fix/null-site-params
Aug 25, 2020
Merged

Make SiteModel params nullable on WPMainActivity VM event handler methods#12794
renanferrari merged 1 commit intofix/login-connected-testsfrom
fix/null-site-params

Conversation

@mzorz
Copy link
Copy Markdown
Contributor

@mzorz mzorz commented Aug 25, 2020

Builds on top of #12783

As detected by @renanferrari (also reported by @ashiagr) and expressed in #12783, this commit in #12728 unintentionally introduced a behavior change that enforced SiteModel to be non-null even when having an uninitialized selectedSite is a temporarily possible state.

As suggested in #12783 and agreed there, I checked all of the places where hasFullAccessToContent() was being called previous to that change to verify site is not enforced as non-null, and made the changes accordingly.

Note: pinging people involved but only 1 approval needed. @ashiagr if you can give it a test, since you could reproduce easily? 🙏

To test:

  • Smoke test the app
  • logout and verify you can log in with self hosted sites only
  • logout and verify you can login with your wp.com account

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link
Copy Markdown

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

You can test the changes on this Pull Request by downloading the APK here.

Copy link
Copy Markdown
Contributor

@renanferrari renanferrari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for handling this, @mzorz! I have tested the changes and can confirm they work well. LGTM!

@renanferrari renanferrari merged commit b556025 into fix/login-connected-tests Aug 25, 2020
@renanferrari renanferrari deleted the fix/null-site-params branch August 25, 2020 17:28
@renanferrari renanferrari mentioned this pull request Aug 25, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants