Skip to content

Commit 85738a1

Browse files
authored
Merge pull request #236 from magento-pangolin/MQE-683
MQE-683: [Deprecation] Only use more nested assertion syntax
2 parents 826fea9 + 58b25ca commit 85738a1

File tree

84 files changed

+1365
-379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1365
-379
lines changed

app/code/Magento/Backend/Test/Mftf/Test/AdminAttributeTextSwatchesCanBeFiledTest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@
110110
<grabValueFrom selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" stepKey="grabDescriptionForAdmin"/>
111111

112112
<!-- Check that Swatch and Description fields for Admin are not empty-->
113-
<assertNotEmpty actual="$grabSwatchForAdmin" stepKey="checkSwatchFieldForAdmin"/>
114-
<assertNotEmpty actual="$grabDescriptionForAdmin" stepKey="checkDescriptionFieldForAdmin"/>
113+
<assertNotEmpty stepKey="checkSwatchFieldForAdmin">
114+
<actualResult type="const">$grabSwatchForAdmin</actualResult>
115+
</assertNotEmpty>
116+
<assertNotEmpty stepKey="checkDescriptionFieldForAdmin">
117+
<actualResult type="const">$grabDescriptionForAdmin</actualResult>
118+
</assertNotEmpty>
115119
</test>
116120
</tests>

app/code/Magento/Backend/Test/Mftf/Test/AdminCheckLocaleAndDeveloperConfigInProductionModeTest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
<actionGroup ref="AdminOpenStoreConfigPageActionGroup" stepKey="openStoreConfigPage" />
2929
<scrollTo selector="{{LocaleOptionsSection.sectionHeader}}" stepKey="scrollToLocaleSection" x="0" y="-80" />
3030
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSection"/>
31-
<assertElementContainsAttribute selector="{{LocaleOptionsSection.locale}}" attribute="disabled" stepKey="seeDisabledLocaleDropdown" />
31+
<assertElementContainsAttribute stepKey="seeDisabledLocaleDropdown">
32+
<expectedResult selector="{{LocaleOptionsSection.locale}}" attribute="disabled" type="string"></expectedResult>
33+
</assertElementContainsAttribute>
3234

3335
<!-- Go to the developer configuration and make sure the redirect to the configuration page takes place -->
3436
<actionGroup ref="AdminOpenStoreConfigDeveloperPageActionGroup" stepKey="goToDeveloperConfigPage"/>

app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@
120120
<seeElement selector="{{AdminDashboardSection.dashboardDiagramAmountsContentTab}}" stepKey="seeDiagramAmountContent"/>
121121
<seeElement selector="{{AdminDashboardSection.dashboardDiagramTotals}}" stepKey="seeAmountTotals"/>
122122
<dontSeeJsError stepKey="dontSeeJsError"/>
123-
<assertGreaterThan expected="$grabStartQuantity" actual="$grabEndQuantity" stepKey="checkQuantityWasChanged"/>
123+
<assertGreaterThan stepKey="checkQuantityWasChanged">
124+
<actualResult type="const">$grabEndQuantity</actualResult>
125+
<expectedResult type="const">$grabStartQuantity</expectedResult>
126+
</assertGreaterThan>
124127
</test>
125128
</tests>

app/code/Magento/Braintree/Test/Mftf/Test/BraintreeCreditCardOnCheckoutTest.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,13 @@
105105
<grabTextFrom selector="{{CheckoutOrderSummarySection.additionalAddress}}" stepKey="additionalAddress"/>
106106
<see userInput="Shipping Address" stepKey="seeShippingAddress"/>
107107
<see userInput="Billing Address" stepKey="seeBillingAddress"/>
108-
<assertEquals stepKey="assertValuesAreEqual" actual="$billingAddr" expected="$shippingAddr"/>
109-
<assertNotEquals stepKey="assertValuesAreNotEqual" actual="$billingAddr" expected="$additionalAddress"/>
108+
<assertEquals stepKey="assertValuesAreEqual">
109+
<actualResult type="const">$billingAddr</actualResult>
110+
<expectedResult type="const">$shippingAddr</expectedResult>
111+
</assertEquals>
112+
<assertNotEquals stepKey="assertValuesAreNotEqual">
113+
<actualResult type="const">$billingAddr</actualResult>
114+
<expectedResult type="const">$additionalAddress</expectedResult>
115+
</assertNotEquals>
110116
</test>
111117
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAddBundleOptionsToCartTest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@
108108

109109
<!--Assert Bundle Product Price-->
110110
<grabTextFrom selector="{{StorefrontBundledSection.bundleProductsPrice}}" stepKey="grabProductsPrice"/>
111-
<assertEquals expected='$123.00' expectedType="string" actual="$grabProductsPrice" message="ExpectedPrice" stepKey="assertBundleProductPrice"/>
111+
<assertEquals message="ExpectedPrice" stepKey="assertBundleProductPrice">
112+
<actualResult type="const">$grabProductsPrice</actualResult>
113+
<expectedResult type="string">$123.00</expectedResult>
114+
</assertEquals>
112115

113116
<!--Chose all products from 1st & 3rd options -->
114117
<click stepKey="selectProduct1" selector="{{StorefrontBundledSection.productCheckbox('1','1')}}"/>

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdminEditDataTest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@
103103
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="onPageShoppingCart1"/>
104104
<waitForPageLoad stepKey="waitForCartPageLoad1"/>
105105
<grabTextFrom selector="{{CheckoutCartProductSection.nthBundleOptionName('1')}}" stepKey="grabTotalAfter"/>
106-
<assertNotEquals expected="{$grabTotalBefore}" expectedType="string" actual="{$grabTotalAfter}" actualType="string" stepKey="assertNotEquals"/>
106+
<assertNotEquals stepKey="assertNotEquals">
107+
<actualResult type="string">{$grabTotalAfter}</actualResult>
108+
<expectedResult type="string">{$grabTotalBefore}</expectedResult>
109+
</assertNotEquals>
107110

108111
<!-- Delete the bundled product -->
109112
<actionGroup stepKey="deleteBundle" ref="DeleteProductUsingProductGridActionGroup">

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@
115115
<waitForElementVisible stepKey="waitForInfoDropdown2" selector="{{CheckoutCartSummarySection.total}}"/>
116116
<waitForPageLoad stepKey="waitForCartPageLoad4"/>
117117
<grabTextFrom selector="{{CheckoutCartSummarySection.total}}" stepKey="grabTotalAfter"/>
118-
<assertNotEquals expected="{$grabTotalBefore}" expectedType="string" actual="{$grabTotalAfter}" actualType="string" stepKey="assertNotEquals"/>
118+
<assertNotEquals stepKey="assertNotEquals">
119+
<actualResult type="string">{$grabTotalAfter}</actualResult>
120+
<expectedResult type="string">{$grabTotalBefore}</expectedResult>
121+
</assertNotEquals>
119122

120123
<!-- Delete the bundled product -->
121124
<actionGroup stepKey="deleteBundle" ref="DeleteProductUsingProductGridActionGroup">

app/code/Magento/Catalog/Test/Mftf/ActionGroup/CheckCustomizableOptionImportActionGroup.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,17 @@
2020
<grabValueFrom selector="{{AdminProductCustomizableOptionsSection.optionTitleInput(optionIndex)}}" stepKey="grabOptionTitle"/>
2121
<grabValueFrom selector="{{AdminProductCustomizableOptionsSection.optionPrice(optionIndex)}}" stepKey="grabOptionPrice"/>
2222
<grabValueFrom selector="{{AdminProductCustomizableOptionsSection.optionSku(optionIndex)}}" stepKey="grabOptionSku"/>
23-
<assertEquals expected="{{option.title}}" expectedType="string" actual="$grabOptionTitle" stepKey="assertOptionTitle"/>
24-
<assertEquals expected="{{option.price}}" expectedType="string" actual="$grabOptionPrice" stepKey="assertOptionPrice"/>
25-
<assertEquals expected="{{option.title}}" expectedType="string" actual="$grabOptionSku" stepKey="assertOptionSku"/>
23+
<assertEquals stepKey="assertOptionTitle">
24+
<actualResult type="const">$grabOptionTitle</actualResult>
25+
<expectedResult type="string">{{option.title}}</expectedResult>
26+
</assertEquals>
27+
<assertEquals stepKey="assertOptionPrice">
28+
<actualResult type="const">$grabOptionPrice</actualResult>
29+
<expectedResult type="string">{{option.price}}</expectedResult>
30+
</assertEquals>
31+
<assertEquals stepKey="assertOptionSku">
32+
<actualResult type="const">$grabOptionSku</actualResult>
33+
<expectedResult type="string">{{option.title}}</expectedResult>
34+
</assertEquals>
2635
</actionGroup>
2736
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/CheckProductsOrderActionGroup.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@
2525
<waitForPageLoad stepKey="waitForPageLoad5AfterCacheCleared" time="60"/>
2626
<waitForElement selector="{{StorefrontCategoryProductSection.ProductImageByNumber('1')}}" time="120" stepKey="waitCompareWidgetLoad" />
2727
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByNumber('1')}}" userInput="alt" stepKey="grabFirstProductName1_1"/>
28-
<assertEquals expected="{{product_1.name}}" actual="($grabFirstProductName1_1)" message="notExpectedOrder" stepKey="compare1"/>
28+
<assertEquals message="notExpectedOrder" stepKey="compare1">
29+
<actualResult type="const">($grabFirstProductName1_1)</actualResult>
30+
<expectedResult type="const">{{product_1.name}}</expectedResult>
31+
</assertEquals>
2932
<grabAttributeFrom selector="{{StorefrontCategoryProductSection.ProductImageByNumber('2')}}" userInput="alt" stepKey="grabFirstProductName2_2"/>
30-
<assertEquals expected="{{product_2.name}}" actual="($grabFirstProductName2_2)" message="notExpectedOrder" stepKey="compare2"/>
33+
<assertEquals message="notExpectedOrder" stepKey="compare2">
34+
<actualResult type="const">($grabFirstProductName2_2)</actualResult>
35+
<expectedResult type="const">{{product_2.name}}</expectedResult>
36+
</assertEquals>
3137
</actionGroup>
3238
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductSpecialPriceOnProductPageActionGroup.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
<waitForPageLoad stepKey="waitForFirstProductPage"/>
2121
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.specialPriceValue}}" stepKey="waitForProductSpecialPrice"/>
2222
<grabTextFrom selector="{{StorefrontProductInfoMainSection.specialPriceValue}}" stepKey="grabProductSpecialPrice"/>
23-
<assertEquals actual="$grabProductSpecialPrice" expectedType="string" expected="{{specialPrice}}" stepKey="assertProductPriceValuesAreEqual"/>
23+
<assertEquals stepKey="assertProductPriceValuesAreEqual">
24+
<actualResult type="const">$grabProductSpecialPrice</actualResult>
25+
<expectedResult type="string">{{specialPrice}}</expectedResult>
26+
</assertEquals>
2427
</actionGroup>
2528
</actionGroups>

0 commit comments

Comments
 (0)