woocommerce / woocommerce-google-analytics-integration

WordPress plugin: Provides the integration between WooCommerce and Google Analytics.
http://wordpress.org/plugins/woocommerce-google-analytics-integration/
170 stars 69 forks source link

Add automated tests for formatting products #442

Open tomalec opened 2 months ago

tomalec commented 2 months ago

This is a follow-up from https://github.com/woocommerce/woocommerce-google-analytics-integration/pull/439

~User~Developer story

As a developer, I'd like to have automated tests to help me assert the quality of the extension in regards to tracked product data.

Is your feature request related to a problem?

get_formatted_product is not covered by tests

How to reproduce the problem

Describe the solution you'd like

We could add PHP unit tests to check get_formatted_product for simple, variable and bundled products. We can also consider adding E2Es to somewhat test Block-based events' data.

Describe alternatives you've considered

Technical

Acceptance criteria

Unknowns

Out of bounds/rabbit holes