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

Add unit test for FeaturedSummary sponsoredPodcasts #2290

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

bjtitus
Copy link
Contributor

@bjtitus bjtitus commented Oct 17, 2024

Adds a unit test for the sponsoredPodcasts sorting in FeaturedSummary.

Also adds an extension, XCTestCase.waitForCondition to asynchronously wait for a callback to complete.

A few things to note:

  • This requires a network connection
  • I couldn't figure out a good way to reproduce without repopulating the items twice. It doesn't happen every time but it happened a majority of the time for me.

To test

  • 🟢 CI
  • Run unit tests and make sure they pass

Checklist

  • I have considered if this change warrants user-facing release notes and have added them to CHANGELOG.md if necessary.
  • I have considered adding unit tests for my changes.
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

@bjtitus bjtitus requested a review from a team as a code owner October 17, 2024 03:06
@bjtitus bjtitus requested review from SergioEstevao and removed request for a team October 17, 2024 03:06
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@bjtitus bjtitus added this to the 7.76 milestone Oct 17, 2024
Copy link
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

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

Code looks good and tests work locally.
But I'm bit sceptical about the need of network to be able to run test. Can't we mock the network call? Aren't we running into the risk of test failure because CI connectivity issues?

@SergioEstevao SergioEstevao modified the milestones: 7.76, 7.77 Oct 28, 2024
@SergioEstevao
Copy link
Contributor

Version 7.76 has now entered code-freeze, so the milestone of this PR has been updated to 7.77.

@SergioEstevao
Copy link
Contributor

@bjtitus are you planning to udpate this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants