e2e: Add hacky workaround for product image gallery (https://github.com/woocommerce/woocommerce-blocks/pull/11655)
This commit is contained in:
parent
419d4ed4fd
commit
08b0ceff53
|
@ -5,3 +5,11 @@
|
|||
###################################################################################################
|
||||
wp import wp-content/plugins/woocommerce/sample-data/sample_products.xml --authors=skip
|
||||
wp wc tool run regenerate_product_lookup_tables --user=1
|
||||
|
||||
# This is a hacky work around to fix product gallery images not being imported
|
||||
# This sets up the product Hoodie to have product gallery images for e2e testing
|
||||
post_id=$(wp post list --post_type=product --field=ID --name="Hoodie" --format=ids)
|
||||
image1=$(wp post list --post_type=attachment --field=ID --name="hoodie-with-logo-2.jpg" --format=ids)
|
||||
image2=$(wp post list --post_type=attachment --field=ID --name="hoodie-green-1.jpg" --format=ids)
|
||||
image3=$(wp post list --post_type=attachment --field=ID --name="hoodie-2.jpg" --format=ids)
|
||||
wp post meta update $post_id _product_image_gallery "$image1,$image2,$image3"
|
||||
|
|
Loading…
Reference in New Issue