Skip to content
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

Fix ghost not disappearing from Insights cards in certain conditions #18104

Merged
merged 3 commits into from
Mar 11, 2022

Conversation

Gio2018
Copy link
Contributor

@Gio2018 Gio2018 commented Mar 8, 2022

Fixes #17904

To test:
Pre-requisite: use a wp.com account with one or more site that have stats, preferably with many accesses

Testing:

  1. Build/run and go to "My Site"
  2. Tap on "Stats" then "Insights" (if you're not already there)
  3. Screen should load normally
  4. Navigate / back out to "My Site"
  5. Repeat step 2
  6. No ghost cards should appear

Regression Notes

  1. Potential unintended areas of impact
    Stats -> Insights

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Manual test and run UI tests

  3. What automated tests I added (or what prevented me from doing so)4.
    Some changes to the UI tests
    PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • 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.

@Gio2018 Gio2018 added this to the 19.4 ❄️ milestone Mar 8, 2022
@Gio2018 Gio2018 marked this pull request as draft March 8, 2022 18:44
@Gio2018
Copy link
Contributor Author

Gio2018 commented Mar 8, 2022

@mokagio this PR follows #18072 to fix the issues that cause ui tests to fail. Still draft for now, but wanted to let you know we're on it

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 8, 2022

You can test the Jetpack changes on this Pull Request by downloading it from AppCenter here with build number: pr18104-8b3822e. IPA is available here. If you need access to this, you can ask a maintainer to add you.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 8, 2022

You can test the WordPress changes on this Pull Request by downloading it from AppCenter here with build number: pr18104-8b3822e. IPA is available here. If you need access to this, you can ask a maintainer to add you.

@mokagio
Copy link
Contributor

mokagio commented Mar 8, 2022

Beautiful! Thank you @Gio2018. cc @tiagomar

@Gio2018 Gio2018 self-assigned this Mar 9, 2022
@Gio2018 Gio2018 marked this pull request as ready for review March 9, 2022 17:52
@Gio2018 Gio2018 requested review from sla8c and frosty March 9, 2022 17:53
@mokagio
Copy link
Contributor

mokagio commented Mar 10, 2022

This fixes the ghost views appearing in the iPad UI tests 🎉 but the tests are still failing 🤔

The difference from #18072 is that they now all fail because the screen says "no data yet" in every field. Here's a screenshot from the CI .xcresult:

image

@mokagio mokagio mentioned this pull request Mar 10, 2022
4 tasks
Copy link
Contributor

@sla8c sla8c left a comment

Choose a reason for hiding this comment

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

Hey @Gio2018 the direction + outcome of all the new state status(es) being set need to be reversed.

Example for a single status - it should be like:
state.allTimeStats != nil ? .success : .error

OR
state.allTimeStats == nil ? .error : .success

Instead of:
state.allTimeStats != nil ? .error : .success

I made this mistake the first time and this was my first commit before I corrected it so I'm sure that's what has transpired.

Link to my correction here

@Gio2018 Gio2018 requested a review from sla8c March 10, 2022 17:37
@mokagio
Copy link
Contributor

mokagio commented Mar 11, 2022

FYI, #18119, which addresses the UI tests issue, has been merged in the release branch.

A merge or rebase here should address the UI tests failures because of the "No data yet" and move along testing the new logic.

Copy link
Contributor

@sla8c sla8c left a comment

Choose a reason for hiding this comment

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

LGTM!

@Gio2018 Gio2018 merged commit 27108ee into release/19.4 Mar 11, 2022
@Gio2018 Gio2018 deleted the issue-17904-insights-cards-not-showing branch March 11, 2022 16:11
@mokagio
Copy link
Contributor

mokagio commented Mar 15, 2022

@Gio2018 this has been bundled as part of 19.4 beta 2 (19.4.0.2).

Thanks for your work 🙌

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