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 error handling and tests for ShippingPartnerSuggestions #44641

Merged
merged 3 commits into from Feb 16, 2024

Conversation

ilyasfoo
Copy link
Contributor

@ilyasfoo ilyasfoo commented Feb 15, 2024

Changes proposed in this Pull Request:

Partially closes #44248.

How to test the changes in this Pull Request:

Test shipping task

  1. In a fresh store, go through onboarding, select United Kingdom country in onboarding wizard
  2. In homescreen, click on Add shipping costs task
  3. Fill in the form with whatever and continue in step 1 and 2
  4. In step 3, observe ShipStation and sendcloud is shown

Testing transient when specs are valid

  1. Open console with access to wp-cli
  2. Run wp transient get timeout_woocommerce_admin_shipping_partner_suggestions_specs
  3. Confirm it returns a timestamp that is about 7 days from now

Testing transient when specs are invalid

  1. Manually replace ShippingPartnerSuggestionsDataSourcePoller.php with https://api.npoint.io/dedddcb56c3642d967f9
  2. Run wp transient delete woocommerce_admin_shipping_partner_suggestions_specs
  3. Run wp transient delete timeout_woocommerce_admin_shipping_partner_suggestions_specs
  4. Run wp option delete woocommerce_admin_created_default_shipping_zones
  5. Run wp option delete woocommerce_admin_reviewed_default_shipping_zones
  6. Go to WooCommerce > Settings > Shipping and delete all shipping zones.
  7. Go to homescreen, click on Add shipping costs task
  8. Run wp transient get timeout_woocommerce_admin_shipping_partner_suggestions_specs
  9. Confirm it returns a timestamp that is about 3 hours from now

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Comment

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Feb 15, 2024
@ilyasfoo ilyasfoo requested review from a team, chihsuan and moon0326 February 15, 2024 13:44
Copy link
Contributor

Hi @chihsuan, @moon0326, @woocommerce/ghidorah

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Contributor

github-actions bot commented Feb 15, 2024

Test Results Summary

Commit SHA: 593364e

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 37s
E2E Tests31800703257m 16s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

Copy link
Contributor

@moon0326 moon0326 left a comment

Choose a reason for hiding this comment

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

LGTM and tested well 👍 🚀

Copy link
Member

@chihsuan chihsuan left a comment

Choose a reason for hiding this comment

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

Thanks, looks good and tested well! 👍

@ilyasfoo ilyasfoo merged commit 0ea64cf into trunk Feb 16, 2024
34 checks passed
@ilyasfoo ilyasfoo deleted the add/44248-error-handling-shipping-partners branch February 16, 2024 07:18
@github-actions github-actions bot added this to the 8.7.0 milestone Feb 16, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Feb 16, 2024
@Stojdza Stojdza added status: analysis complete Indicates if a PR has been analysed by Solaris needs: internal testing Indicates if the PR requires further testing conducted by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: internal testing Indicates if the PR requires further testing conducted by Solaris plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrap remote endpoints with error handling
4 participants