Skip to content

Commit 7b5ff25

Browse files
dimadidrsdaugherty-rpbgiamarino
authored
ADO-119 remediate mftf tests failures (#118)
* Move mftf tests * Remove skip from mftf test * Update expected result regular expression * Remove skip from mftf test * Update expected result regular expression * Remove skip from mftf test * Update expected result regular expression * Remove skip from mftf test * Update expected result regular expression * Remove skip from mftf test * Update expected result regular expression * Remove skip from mftf test * Update expected result regular expression * initial changes. instead of overriding default product/categories, create new ones that extend defaults * ADO-119 updates for AddToCartPixelEventCreatedTest mftf to pass - setup_version no longer used. updated add to cart pixel to get correct version of meta package composer module version - update mftf plugin info data to use magento_opensource as source. may need additional consideration to handle both opensource / commerce - updates to mftf meta product data to generate unique suffixes on product data - update AddToCartPixelEventCreatedTest test to pass. fixed regex and made use of core mftf action groups - updated add to cart pixel product data ajax call to use GET insteads of POST. POST was making add to cart success message disappear and test failure * ADO-119 fix InitiateCheckoutPixelEventCreatedTest mftf test. adjust to use core action groups and update pixel even regex check * remove search/category/content tests that fail on regex check that is no longer applicable. will need to address another way * fix PurchasePixelEventCreatedTest mftf regex. pixel id length shows up as 15 (instead of 16) characters * skip meta tests for now due to issue setting pixel id config * add before/after pixel id commands to meta tests * allow pixel id to be set via config cli for meta tests (add to cart, initiate checkout, purchase pixel) * adjust pixel mftf tests for alterntative to regexp pagesource test. Checks for element on page indicating pixel is present --------- Co-authored-by: Seth Daugherty <[email protected]> Co-authored-by: Ben Giamarino <[email protected]>
1 parent 72d430b commit 7b5ff25

33 files changed

+312
-338
lines changed

app/code/Meta/BusinessExtension/Helper/FBEHelper.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ class FBEHelper extends AbstractHelper
4747

4848
private const CURRENT_API_VERSION = "v15.0";
4949

50-
private const MODULE_NAME = "Meta_BusinessExtension";
51-
5250
/**
5351
* @var ObjectManagerInterface
5452
*/
@@ -129,9 +127,9 @@ public function getMagentoVersion(): string
129127
/**
130128
* Get plugin version
131129
*
132-
* @return mixed
130+
* @return string
133131
*/
134-
public function getPluginVersion()
132+
public function getPluginVersion(): string
135133
{
136134
return $this->systemConfig->getModuleVersion();
137135
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
5+
<entity name="FacebookBusinessConfigDataEnabled">
6+
<data key="path">facebook/business_extension/active</data>
7+
<data key="scope">store</data>
8+
<data key="scope_code">default</data>
9+
</entity>
10+
<entity name="FacebookBusinessConfigDataPixelId">
11+
<data key="path">facebook/business_extension/pixel_id</data>
12+
<data key="scope">store</data>
13+
<data key="scope_code">default</data>
14+
</entity>
15+
</entities>

app/code/Meta/BusinessExtension/etc/adminhtml/system.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
2424
<frontend_model>Meta\BusinessExtension\Block\Adminhtml\System\Config\Field\Hidden</frontend_model>
2525
</field>
26+
<field id="pixel_id" translate="label" type="label" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="1">
27+
<label>Pixel Id</label>
28+
<config_path>facebook/business_extension/pixel_id</config_path>
29+
<frontend_model>Meta\BusinessExtension\Block\Adminhtml\System\Config\Field\Hidden</frontend_model>
30+
</field>
2631
<field id="module_info" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="0" showInStore="1">
2732
<label>Module Info</label>
2833
<depends>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!--Fill search form-->
66
<actionGroup name="fillCustomerInformation">
77
<arguments>
8-
<argument name="customer" defaultValue="_defaultCustomer"/>
8+
<argument name="customer" defaultValue="_defaultMetaCustomer"/>
99
</arguments>
1010
<fillField userInput="{{customer.email}}" selector="#customer-email" stepKey="fillEmail"/>
1111
<waitForAjaxLoad stepKey="waitForAccountVerification"/>
File renamed without changes.

app/code/Meta/Conversion/Test/Mftf/Legacy/Data/CategoryData.xml renamed to app/code/Meta/Conversion/Test/Mftf/Data/CategoryData.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
5-
<entity name="_defaultCategory" type="category">
5+
<entity name="_defaultMetaCategory" type="category" extends="_defaultCategory">
66
<data key="name">consoles</data>
7-
<data key="is_active">true</data>
7+
<data key="name_lwr">consoles</data>
8+
<data key="urlKey" unique="suffix">consoles</data>
89
<data key="parent_id">2</data>
910
<data key="include_in_menu">true</data>
1011
</entity>

app/code/Meta/Conversion/Test/Mftf/Legacy/Data/CustomerData.xml renamed to app/code/Meta/Conversion/Test/Mftf/Data/CustomerData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
5-
<entity name="_defaultCustomer" type="Customer">
5+
<entity name="_defaultMetaCustomer" type="customer">
66
<data key="email">[email protected]</data>
77
<data key="firstName">Homer</data>
88
<data key="lastName">Simpson</data>

app/code/Meta/Conversion/Test/Mftf/Legacy/Data/PluginInfoData.xml renamed to app/code/Meta/Conversion/Test/Mftf/Data/PluginInfoData.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
5-
<entity name="_pluginInfo" type="PluginInfo">
6-
<data key="source">magento2</data>
5+
<entity name="_pluginInfo" type="plugin_info">
6+
<data key="source">magento_opensource</data>
77
<data key="pluginVersion">2.0.0</data>
88
</entity>
99
</entities>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
5+
<entity name="_defaultMetaProduct" type="product" extends="_defaultProduct">
6+
<data key="sku" unique="suffix">CON1</data>
7+
<data key="name" unique="suffix">Console1</data>
8+
<data key="urlKey" unique="suffix">console-product</data>
9+
<data key="price">500</data>
10+
<data key="weight">10</data>
11+
</entity>
12+
</entities>
File renamed without changes.

0 commit comments

Comments
 (0)