-
Notifications
You must be signed in to change notification settings - Fork 138
Smoke tests
Use this guide to run smoke tests on the plugin. You can copy and paste this into a new GitHub issue for carrying out compatibility testing work. If there's a common use case or cause of errors that are not included, please add it!
After each step during testing, be sure to check the debug logs as well as the browser console for errors, warnings or notices.
Prerequisites: Facebook account, WooCommerce store with existing products and categories. (For example, see Importing WooCommerce Sample Data).
Note:
-
If you are creating a new Facebook account, you will need to wait one hour before you can proceed to create a new Facebook business account.
-
It seems like the plugin does not work very well with "External/Affiliate product", so when you are doing the following testing, the product and category mentioned below should not be related to "External/Affiliate product" (the product does not have a "Facebook" tab in the Edit Product > Product data section); "Simple product" or "Variable product" would work fine.
Use the list below as a short reference and/or copy it and use it as a checklist when performing your tests.
- Activate/deactivate the plugin.
- Connect to a Facebook business account.
- Enable "Log plugin events for debugging" after connecting an account.
- Install and activate the plugin with WooCommerce de-activated.
- Install and activate the plugin with WooCommerce activated.
- Facebook is not connected.
- Business account details are shown after connecting to Facebook and aren't empty.
- Catalog Name link is present and links to Facebook Catalog.
- Clicking "Sync products" syncs products to Facebook Catalog.
- Excluding a Category will exclude products from the category being synced to Facebook Catalog and show the popup.
- New products added to the excluded Category aren't synced to Facebook Catalog and the message is shown.
- Adding new Simple Product should sync the product to Facebook.
- Adding new Simple Product to Facebook Product sync excluded Category should show a message.
- Adding new Variable Product with attributes should sync to Facebook.
- A Simple Product synced to Facebook Catalog.
- Go to WooCommerce > Settings > Products > Inventory, enable "Hide out of stock items from the catalog" and Save changes.
- Edited the product name and description will sync to Facebook Catalog.
- Edited product price will sync to Facebook Catalog.
- Facebook price will sync to Facebook Catalog and overwrite the regular price.
- Zero stock quantity should remove a product from Facebook Catalog.
- Positive stock quantity should put the product back to Facebook Catalog.
- 'Do not sync' a product and confirm it is removed from Facebook Catalog (after clicking the correct option on the popup).
- Sync virtual product will sync and hide the product on Facebook.
- Facebook synced Variable Product.
- Adding product variations from multiple product attributes should sync to Facebook.
- Managing stock for a variation and setting stock quantity to zero should remove the product from Facebook.
- [FAILING] Managing stock for a variation and setting stock quantity to a positive non-zero value should add the product variation to Facebook Catalog Items.
- Managing stock for variable product at product level should remove the product and all its variations from Facebook.
- [FAILING] Managing stock for variable product at product level with a positive
Stock quantity
should add an out of stock product back into Facebook Catalog.
- A Category with products synced to Facebook.
- A Category with products not synced to Facebook.
- A Category with products either synced, partially synced or not synced to Facebook.
- Facebook Set from a Category syncs to Facebook.
- Facebook Set from excluded Category does not sync to Facebook.
- Facebook Set from a Category with no products does not sync to Facebook.
- At least one product synced to Facebook with a status of
Sync and show
orSync and hide
.
- Check Product feed file exists.
- Check Product Feed has all the products synced to Facebook.
- Update one of the products and check the changes populated to the feed file.
Below you will find detailed instructions on how to perform each individual test with screens and details.
- Facebook is not connected.
- Business account details are shown after connecting to Facebook and aren't empty.
- Catalog Name link is present and links to Facebook Catalog.
Click Get Started (blue button) to start Facebook connection process. Follow official documentation regarding connection process which can be found here Getting Started
After connecting to Facebook Business Account you should see the page filled with data from your account. Page, Pixel and Business Account must display corresponding IDs.
Catalog section contains a link which represents Facebook Catalog name and links to Facebook Catalog.
- Clicking "Sync products" syncs products to Facebook Catalog.
- Excluding a Category will exclude products from the category being synced to Facebook Catalog and show the popup.
- New products added to the excluded Category aren't synced to Facebook Catalog and the message is shown.
Clicking Sync products should sync product to Facebook Catalog.
To check if product were synced click the Catalog name and follow the link to Facebook Catalog Items page to see the items.
Facebook Catalog Items
Note: You see image warnings because the image provided was made from local installation and image urls aren't accessible from the internet.
Excluding a Category will exclude products from the category being synced to Facebook Catalog and show the popup.
Pick a Category to exclude products from.
If you have products from the selected category already synced to Facebook, the message should appear.
New products added to the excluded Category aren't synced to Facebook Catalog and the message is shown.
Trying to sync a product from the excluded category will show the message and the product will not be synced to Facebook Catalog.
- Adding new Simple Product should sync the product to Facebook.
- Adding new Simple Product to Facebook Product sync excluded Category should show a message.
Create new product and fill the required fields.
❗ Confirm that the new product is set to Sync and show in catalog
by default (see https://github.com/woocommerce/facebook-for-woocommerce/pull/2473)
Publish the product and see Facebook Product Sync box on the right has Facebook product ID.
Open Facebook Commerce Manager and see the product synced.
Exclude a Category from Facebook Product sync.
Add a new product to the one of Facebook Product sync excluded categories.
You should see a message suggesting to Go to Settings and enable the Category for Facebook Product sync.
- Adding new Variable Product with attributes should sync to Facebook.
Create Variable Product with attributes.
With attributes and use those attributes to create product variations.
See three product variations were created.
Set each variation Regular price and Save changes.
Publish the Product and see Facebook Product Sync right box with Facebook details for the product.
Note that product variation IDs are updates in async manner and there is a delay. Refresh the page to see variation ids.
Check Facebook Commerce Manager Catalog Items to find the variable product.
- A Simple Product synced to Facebook Catalog.
- Edited the product name and description will sync to Facebook Catalog.
- Edited product price will sync to Facebook Catalog.
- Facebook price will sync to Facebook Catalog and overwrite the regular price.
- Zero stock quantity should remove a product from Facebook Catalog.
- Positive stock quantity should put the product back to Facebook Catalog.
- 'Do not sync' a product and confirm it is removed from Facebook Catalog.
Set Facebook Price and Update the product.
See the product price updated on Facebook.
After enabling stock management and setting stock to 0, updated product must be removed from Facebook Catalog.
See the product missing from Facebook Catalog.
NOTE As of 1 August 2023, products appear to simple be listed as Out Of Stock / Sold:
And Facebook product Sync box change from
To
And Facebook product Sync box change from
To
Clicking Facebook ID link will open Facebook Product page with the product present on it. Keep in mind when you change stock quantity from 0 to some positive number and Update the product the product Facebook ID changes.
Edit a product and choose 'Do not sync' the product to Facebook.
You should see a popup
Clicking 'Remove from sync and delete' and updating the product after should make the product missing from Facebook Catalog Items.
- Sync virtual product will sync and hide the product on Facebook.
Check virtual product, select Include in Facebook sync bulk action and hit Apply.
You should see a message with a reference to Facebook Commerce Policies saying virtual products are not allowed to be sold on Facebook. But the product was still synced but hidden to Facebook.
- Facebook synced Variable Product.
- Adding product variations from multiple product attributes should sync to Facebook.
- Managing stock for a variation and setting stock quantity to zero should remove the product from Facebook.
- [FAILING] Managing stock for a variation and setting stock quantity to a positive non-zero value should add the product variation to Facebook Catalog Items.
- Managing stock for variable product at product level should remove the product and all its variations from Facebook.
- [FAILING] Managing stock for variable product at product level with a positive
Stock quantity
should add an out of stock product back into Facebook Catalog.
Add multiple product attributes e.g. Size and Colour.
Map product to a Google Product Category e.g. Clothing. Just select the category, all the category specific attributes leave them as is.
Create some product variations. And set each variation a Regular price, so it could be synced to Facebook.
Update the product and note Facebook Product Sync box.
Check synced product have attributes synced and variations created.
Managing stock for a variation and setting stock quantity to zero should remove the product from Facebook.
Enable Manage stock?
at one of the product variations and set Stock quantity
to zero.
Update the product and watch out of stock variations removed from Facebook.
Managing stock for a variation and setting stock quantity to a positive non-zero value should add the product variation to Facebook Catalog Items.
Make sure you have a variable product with some of its variations with Out of stock
status.
Facebook Commerce Manager Catalog Item have two corresponding variation of the product synced.
Enable stock for another product variation and Update the product.
See the variation appear to Facebook Commerce Manager Catalog Item.
Managing stock for variable product at product level should remove the product and all its variations from Facebook.
Look at Facebook Product Sync box to see all the product synced.
Go to Facebook Commerce Manager Catalog Items to see all five product variations are synced.
Enable stock management at product level. And set Stock quantity to zero. Update the product.
See the product removed from Facebook Catalog. Facebook Product Sync box it empty.
And Facebook Commerce Manager Catalog Items has no variable product present.
Managing stock for variable product at product level with a positive Stock quantity
should add an out of stock product back into Facebook Catalog.
Set a non zero Stock quantity for an Out of stock product which is not listed at Facebook Catalog.
Update the product and see Facebook Product Sync box with Facebook product IDs.
If the box is empty and has no variation ids, please, refresh the page since variation ids are obtained in some async way and may not be immediately present.
Open Facebook Commerce Manager Catalog Items and see the product listed with all its variations which aren't individually excluded for Facebook sync or have out of stock individual settings.
- A Category with products synced to Facebook.
- A Category with produces not synced to Facebook.
- A Category with produces either synced, partially synced or not synced to Facebook.
- Facebook Set from a Category syncs to Facebook.
- Facebook Set from excluded Category does not sync to Facebook.
- Facebook Set from a Category with no products does not sync to Facebook.
Make sure you have a Category with products.
Go to Facebook Commerce Manager and check Catalog Set to see if the set was synced to Facebook.
Exclude a Category from Product sync.
If you had product from the Category synced to Facebook you will see the prompt to Exclude them from sync while saving.
Successfully saved.
Create a Set from the Category we have excluded.
You should see an alert message on a page.
And the Set created.
Make sure Facebook Commerce Manager does not have the set synced to Facebook.
- At least one product synced to Facebook with a status of
Sync and show
orSync and hide
.
- Check Product feed file exists.
- Check Product Feed has all the products synced to Facebook.
- Update one of the products and check the changes populated to the feed file.
Open WordPress folder wp-content/uploads/facebook_for_woocommerce
and look for a file named product_catalog_<random hash string>.csv
e.g. wp-content/uploads/facebook_for_woocommerce/product_catalog_2b933dea049cb549c51110024d97d8c4.csv
If file does not exist, run wc_facebook_regenerate_feed
action to create it.
Compare your products with the Product Feed file to make sure all the product were put into it.
Feed file must contain all the products with Sync and show
and Sync and hide
Facebook statuses.
Feed file status column example.
Products status example. Note Sync and hide
corresponds to hide
in the feed file.
Edit one of the products and change the description.
Update the product, run wc_facebook_regenerate_feed
action and check the feed file again. You should see the corresponding product description changed.
Facebook Set from a Category with no products synced to Facebook dose not sync products to Facebook.
Having a Category with no products synced.
You should see an alert message.