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

MetaDataStore unit tests #14002

Merged
merged 4 commits into from
Sep 24, 2024
Merged

Conversation

pmusolino
Copy link
Member

@pmusolino pmusolino commented Sep 19, 2024

Closes: #13901

Description

This set of changes follows the changes introduced in this PR #13929 handling the test of MetaDataStore unit tests, and introduces a new mock class for MetaDataRemote.

Steps to reproduce

  • Ensure all unit tests in MetaDataStoreTests.swift run successfully.

Testing information

Just CI should be ✅


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on all devices (phone/tablet) and no regressions are added.

- Add new file `Yosemite/YosemiteTests/Stores/MetaDataStoreTests.swift` with unit tests for MetaDataStore.
- Update `Yosemite/Yosemite.xcodeproj/project.pbxproj` to include `MetaDataStoreTests.swift` and `MockMetaDataRemote.swift`.
- Add `newMetadataArray` to `MetaDataStoreTests.swift`
- Update `returnMetaDataArray` for consistency in test cases
- Remove redundant metadata array declarations in tests
…ateOrderMetaData` method.

- Replace `newMetadataArray` with `self.newMetadataArray` in the `updateProductMetaData` method.
@pmusolino pmusolino added type: task An internally driven task. category: unit tests Related to unit testing. labels Sep 19, 2024
@pmusolino pmusolino added this to the 20.5 milestone Sep 19, 2024
@wpmobilebot
Copy link
Collaborator

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14002-51fb6c4
Version20.4
Bundle IDcom.automattic.alpha.woocommerce
Commit51fb6c4
App Center BuildWooCommerce - Prototype Builds #10925
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot wpmobilebot modified the milestones: 20.5, 20.6 Sep 20, 2024
@wpmobilebot
Copy link
Collaborator

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

@hafizrahman hafizrahman self-assigned this Sep 24, 2024
Copy link
Contributor

@hafizrahman hafizrahman left a comment

Choose a reason for hiding this comment

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

As this is just unit tests, I just read the code and ensure they pass. LGTM.

@pmusolino pmusolino merged commit f85e4c3 into trunk Sep 24, 2024
22 of 25 checks passed
@pmusolino pmusolino deleted the issue/13901-MetaDataStore-unit-tests branch September 24, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: unit tests Related to unit testing. type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update API for adding / saving /deleting metadata fields in Order and Products
3 participants