Skip to content

Conversation

@ilyasfoo
Copy link
Contributor

@ilyasfoo ilyasfoo commented May 11, 2022

Changes proposed in this Pull Request:

Follow-up to #32941.

  • Rename functions to be more consistent
  • Move out experiment codes to onboarding package so it can be used by the package
  • Add ExPlat call for PHP part of product task experiment
  • Add experiment check for product import
  • Add experiment check for trackView

How to test the changes in this Pull Request:

Prerequisite

  1. Install WooCommerce Admin Test Helper
  2. Go to Tools > WCA Test Helper > Features
  3. Enable experimental-products-task
  4. Make sure your site has woocommerce_allow_tracking option set to yes

Testing old import if not treatment

  1. Install WooCommerce Admin Test Helper
  2. Go to Tools > WCA Test Helper > Experiments
  3. Disable both woocommerce_products_task_layout_stacked and woocommerce_products_task_layout_card for both frontend and backend experiment
  4. Make sure there are no products in store (if there are in trash, empty them)
  5. Go to appearance task /wp-admin/admin.php?page=wc-admin&task=appearance
  6. Click on "Import products" button
  7. Go to Products page
  8. Observe 18 products are imported

Testing import under treatment

  1. Enable treatment for either woocommerce_products_task_layout_stacked or woocommerce_products_task_layout_card for backend and frontend
  2. Trash all products & empty trash
  3. Go to Products task
  4. Click on "Load sample products"
  5. Observe 9 products are imported

Testing trackView

  1. Enable treatment for either woocommerce_products_task_layout_stacked or woocommerce_products_task_layout_card for frontend
  2. Open up developer console and make sure tracks are debugged localStorage.setItem( 'debug', 'wc-admin:*' );
  3. Go to Products task
  4. Observe wcadmin_task_view track in developer console with experimental_products: true prop

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file for each project being changed, ie pnpm nx changelog <project>?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added focus: react admin package: @woocommerce/onboarding issues related to @woocommerce/onboarding plugin: woocommerce Issues related to the WooCommerce Core plugin. labels May 11, 2022
@ilyasfoo ilyasfoo force-pushed the dev/follow-up-product-task-experiment branch from 5b8b81b to 713198f Compare May 12, 2022 02:41
@ilyasfoo ilyasfoo marked this pull request as ready for review May 12, 2022 03:27
@ilyasfoo ilyasfoo requested a review from a team May 12, 2022 03:27
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.

@ilyasfoo Thanks for updating this. Looks good and tested well. 💯

@ilyasfoo
Copy link
Contributor Author

Merging despite code sniff unsuccessful check due to errors not related to this PR

image

@ilyasfoo ilyasfoo merged commit c8d1c71 into trunk May 12, 2022
@ilyasfoo ilyasfoo deleted the dev/follow-up-product-task-experiment branch May 12, 2022 04:13
@github-actions github-actions bot added this to the 6.6.0 milestone May 12, 2022
@github-actions
Copy link
Contributor

Hi @ilyasfoo, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: @woocommerce/onboarding issues related to @woocommerce/onboarding plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants