Skip to content

Conversation

immadhavv
Copy link
Contributor

Description

Existing E2E tests were only being run and tested on the client side , but not tested if they got synced to Meta properly. This was done by the QA team manually as we did not have any proper framework to do this automatically.

This change enables the team to do just that, by introducing a framework and two critical e2e tests (simple product creation, variable product creation) using the framework to test everything end to end. More tests that are run manually currently can be automated using the same framework.

Changes -

  • Updated the plugin installation to use the required config to connect to a test Meta Catalog. This enables the sync.

  • Fixed the failing e2e tests and updated the tests (to use github_run_id to uniquely identify products from a run and avoid collision) to verify the sync entirely using a Validator

  • Added a Validator that just takes a productId and verifies it completely e2e

  • Flow:
      -     get data from both local WooCommerce and Meta Catalog
      -     check sync status - (synced if ALL products/variations exist in Meta and ALL products/variations belong to the same product group)
      -     compare field values
      -     report in detail
    
  • Finally after validation, clean up the product from Meta Catalog.

Type of change

  • Add (non-breaking change which adds functionality)

Checklist

  • [✅] I have commented my code, particularly in hard-to-understand areas, if any.
  • [✅] I have confirmed that my changes do not introduce any new PHPCS warnings or errors.
  • [✅] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors.
  • [✅] I followed general Pull Request best practices. Meta employees to follow this wiki.
  • [✅] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes.
  • [] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality.
  • [] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this wiki.

Changelog entry

added QA automation framework to completely automate e2e tests.

Test Plan

https://github.com/facebook/facebook-for-woocommerce/actions/runs/17991535339

Screenshots

Before

NA

After

e2e-tests-validated2.mov

@meta-cla meta-cla bot added the CLA Signed label Sep 24, 2025
@immadhavv immadhavv added the changelog: add A new feature, function, or functionality was added. label Sep 24, 2025
Copy link
Contributor

📦 Latest Plugin Build

Built at: 2025-09-24T23:17:46.426Z
Commit: cd45b61
Size: 1.1M

Download: Click here to download the plugin

To download: Click the link above → Scroll to bottom → Download "facebook-for-woocommerce" artifact

wp option update wc_facebook_external_business_id "${{ secrets.FB_EXTERNAL_BUSINESS_ID }}" --allow-root
wp option update wc_facebook_product_catalog_id "${{ secrets.FB_PRODUCT_CATALOG_ID }}" --allow-root
wp option update wc_facebook_pixel_id "${{ secrets.FB_PIXEL_ID }}" --allow-root
wp option update wc_facebook_has_connected_fbe_2 "yes" --allow-root
Copy link
Contributor

Choose a reason for hiding this comment

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

The following rows we might also wanna add as repo variables

@facebook-github-bot
Copy link
Contributor

@immadhavv has imported this pull request. If you are a Meta employee, you can view this in D83242501.

@facebook-github-bot
Copy link
Contributor

@immadhavv has imported this pull request. If you are a Meta employee, you can view this in D83242501.

@facebook-github-bot
Copy link
Contributor

@immadhavv merged this pull request in 8efa689.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: add A new feature, function, or functionality was added. CLA Signed Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants