Skip to content

Fix failing connected tests#12783

Merged
mzorz merged 4 commits intorelease/15.6from
fix/login-connected-tests
Aug 25, 2020
Merged

Fix failing connected tests#12783
mzorz merged 4 commits intorelease/15.6from
fix/login-connected-tests

Conversation

@renanferrari
Copy link
Copy Markdown
Contributor

Fixes connected tests that were failing for loginWithMagicLink due to non-null parameter being null.

I believe this was introduced by this change from this PR.

This PR simply updates onResume(site: SiteModel) to onResume(site: SiteModel?) as it seems to have fixed the issue, but I wonder if we shouldn't do the same for the other functions in that class that also receive a SiteModel? (cc @aforcier as I don't have much context on this right now)

To test:

Run the connected tests from the LoginTests suite and make sure they all pass.

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.

@renanferrari renanferrari added this to the 15.7 milestone Aug 24, 2020
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Aug 24, 2020

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

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Aug 24, 2020

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

@aforcier
Copy link
Copy Markdown
Contributor

Looks good @renanferrari 👍

This PR simply updates onResume(site: SiteModel) to onResume(site: SiteModel?) as it seems to have fixed the issue, but I wonder if we shouldn't do the same for the other functions in that class that also receive a SiteModel? (cc @aforcier as I don't have much context on this right now)

Yeah let's update them all to be consistent.

Also I just realized this is quite a serious issue - it's going to cause a crash on startup for siteless WordPress.com users. The issue is in 15.6, which just went to the beta channel - I believe we need to change this PR to target release/15.6 and release a 15.6-rc-2, is that correct @oguzkocer ?

@oguzkocer
Copy link
Copy Markdown
Contributor

Thanks for taking care of it @renanferrari and reviewing it @aforcier!

@aforcier Yes, if it's a serious issue, it'd be better to target release/15.6. I can release a new version on Thursday with other possible fixes.

@oguzkocer
Copy link
Copy Markdown
Contributor

This may actually be worth a fix on its own, I'll see if anything else is being worked on and potentially release the new beta early.

@mzorz
Copy link
Copy Markdown
Contributor

mzorz commented Aug 25, 2020

Thanks for bringing up a fix for this @renanferrari ! 🙇 Just checked this PR as the issue has been reported once more elsewhere 👍

but I wonder if we shouldn't do the same for the other functions in that class that also receive a SiteModel

Just wanted to add to this, hasFullAccessToContent() in SiteUtils (calls for which were what that commit mostly did) accepts the site parameter being null so with this suggested change / question of yours on other functions I believe the behavior which was changed unintentionally would be restored then 👍

Make SiteModel params nullable on WPMainActivity VM event handler methods
@renanferrari renanferrari changed the base branch from develop to release/15.6 August 25, 2020 17:29
@renanferrari
Copy link
Copy Markdown
Contributor Author

I have merged the changes from #12794 and updated the base branch to release/15.6. Ready for review.

@renanferrari renanferrari requested a review from mzorz August 25, 2020 17:32
Copy link
Copy Markdown
Contributor

@mzorz mzorz left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@mzorz mzorz merged commit ee41a19 into release/15.6 Aug 25, 2020
@mzorz mzorz deleted the fix/login-connected-tests branch August 25, 2020 18:27
@aforcier aforcier modified the milestones: 15.7, 15.6 ❄️ Aug 25, 2020
@aforcier aforcier 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.

5 participants