Skip to content

Commit 756237e

Browse files
committed
MQE-683: [Deprecation] Only use more nested assertion syntax
- Fixed additional edge cases
1 parent 85738a1 commit 756237e

File tree

4 files changed

+24
-14
lines changed

4 files changed

+24
-14
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateDropdownProductAttributeTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@
6666
<!-- Check attribute data -->
6767
<grabValueFrom selector="{{DropdownAttributeOptionsSection.nthOptionAdminLabel('2')}}"
6868
stepKey="secondOptionAdminLabel"/>
69-
<assertEquals actual="$secondOptionAdminLabel" expected="'Fish &amp; Chips'"
70-
stepKey="assertSecondOption"/>
69+
<assertEquals stepKey="assertSecondOption">
70+
<actualResult type="const">$secondOptionAdminLabel</actualResult>
71+
<expectedResult type="const">'Fish &amp; Chips'</expectedResult>
72+
</assertEquals>
7173
</test>
7274
</tests>

app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@
106106
<click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="openProductSection"/>
107107
<grabTextFrom selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createCategory.name$$)}}"
108108
stepKey="grabTextFromCategory"/>
109-
<assertRegExp expected="/\(4\)$/" expectedType="string" actual="$grabTextFromCategory" actualType="variable"
110-
message="wrongCountProductOnAllStoreViews" stepKey="checkCountProducts"/>
109+
<assertRegExp message="wrongCountProductOnAllStoreViews" stepKey="checkCountProducts">
110+
<actualResult type="variable">$grabTextFromCategory</actualResult>
111+
<expectedResult type="string">/\(4\)$/</expectedResult>
112+
</assertRegExp>
111113
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct0.name$$)}}"
112114
userInput="$$createProduct0.name$$" stepKey="seeProductName"/>
113115
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct1.name$$)}}"
@@ -124,8 +126,10 @@
124126
</actionGroup>
125127
<grabTextFrom selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createCategory.name$$)}}"
126128
stepKey="grabTextFromCategory1"/>
127-
<assertRegExp expected="/\(2\)$/" expectedType="string" actual="$grabTextFromCategory1" actualType="variable"
128-
message="wrongCountProductOnWebsite1" stepKey="checkCountProducts1"/>
129+
<assertRegExp message="wrongCountProductOnWebsite1" stepKey="checkCountProducts1">
130+
<actualResult type="variable">$grabTextFromCategory1</actualResult>
131+
<expectedResult type="string">/\(2\)$/</expectedResult>
132+
</assertRegExp>
129133
<click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="openProductSection1"/>
130134
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct1.name$$)}}"
131135
userInput="$$createProduct1.name$$" stepKey="seeProductName4"/>
@@ -144,8 +148,10 @@
144148
<click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="openProductSection2"/>
145149
<grabTextFrom selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createCategory.name$$)}}"
146150
stepKey="grabTextFromCategory2"/>
147-
<assertRegExp expected="/\(2\)$/" expectedType="string" actual="$grabTextFromCategory2" actualType="variable"
148-
message="wrongCountProductOnWebsite2" stepKey="checkCountProducts2"/>
151+
<assertRegExp message="wrongCountProductOnWebsite2" stepKey="checkCountProducts2">
152+
<actualResult type="variable">$grabTextFromCategory2</actualResult>
153+
<expectedResult type="string">/\(2\)$/</expectedResult>
154+
</assertRegExp>
149155
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct2.name$$)}}"
150156
userInput="$$createProduct2.name$$" stepKey="seeProductName6"/>
151157
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct12.name$$)}}"

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogCategoryLinkTypeTest.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@
7070
<see userInput="Hello CMS Page!" stepKey="seeContent2"/>
7171
<!--see widget on Storefront-->
7272
<grabAttributeFrom selector=".widget a" userInput="href" stepKey="dataHref" />
73-
<assertRegExp expected="|$$createPreReqCategory.name$$.html|i"
74-
expectedType="string" actual="$dataHref" actualType="variable"
75-
stepKey="seeProductLinkInCategory"/>
73+
<assertRegExp stepKey="seeProductLinkInCategory">
74+
<actualResult type="variable">$dataHref</actualResult>
75+
<expectedResult type="string">|$$createPreReqCategory.name$$.html|i</expectedResult>
76+
</assertRegExp>
7677
<after>
7778
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCatalog" />
7879
<actionGroup ref="DisabledWYSIWYGActionGroup" stepKey="disableWYSIWYG"/>

app/code/Magento/Cms/Test/Mftf/Test/AdminAddWidgetToWYSIWYGWithCatalogProductLinkTypeTest.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@
7676
<waitForPageLoad stepKey="wait8" />
7777
<!--see widget on Storefront-->
7878
<grabAttributeFrom selector=".widget a" userInput="href" stepKey="dataHref" />
79-
<assertRegExp expected="|$$createPreReqCategory.name$$/$$createPreReqProduct.name$$.html|i"
80-
expectedType="string" actual="$dataHref" actualType="variable"
81-
stepKey="seeProductLinkInCategory"/>
79+
<assertRegExp stepKey="seeProductLinkInCategory">
80+
<actualResult type="variable">$dataHref</actualResult>
81+
<expectedResult type="string">|$$createPreReqCategory.name$$/$$createPreReqProduct.name$$.html|i</expectedResult>
82+
</assertRegExp>
8283
<after>
8384
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCatalog" />
8485
<deleteData createDataKey="createPreReqProduct" stepKey="deletePreReqProduct" />

0 commit comments

Comments
 (0)