Skip to content

Commit d7dc74d

Browse files
Merge branch 'ACQE-4291_1' into ACQE-6392
2 parents 7730f6e + 5d7d8af commit d7dc74d

File tree

4 files changed

+581
-0
lines changed

4 files changed

+581
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontAssertProductPriceAndPriceLabelIfPresentOnCategoryPageActionGroup">
12+
<annotations>
13+
<description>Validate that the price and price label if present on category page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" type="string"/>
17+
<argument name="price" type="string"/>
18+
<argument name="priceLabel" type="string"/>
19+
</arguments>
20+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.productNameWithPriceOrLabel(productName,priceLabel)}}" stepKey="assertProductPriceLabel"/>
21+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.productNameWithPriceOrLabel(productName,price)}}" stepKey="assertProductPrice"/>
22+
</actionGroup>
23+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontAssertProductPriceAndPriceLabelIsNotPresentOnCategoryPageActionGroup">
12+
<annotations>
13+
<description>Validate that the price and price label is not present on category page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="productName" type="string"/>
17+
<argument name="price" type="string"/>
18+
<argument name="priceLabel" type="string"/>
19+
</arguments>
20+
<dontSeeElement selector="{{StorefrontCategoryMainSection.productNameWithPriceOrLabel(productName,priceLabel)}}" stepKey="dontSeePriceLabel"/>
21+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.productNameWithPriceOrLabel(productName,price)}}" stepKey="assertProductPrice"/>
22+
</actionGroup>
23+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
<element name="outOfStockProductCategoryPage" type="text" selector="//div[@class='stock unavailable']//span[text()='Out of stock']"/>
4747
<element name="ListedProductAttributes" type="block" selector="//div[@aria-label='{{vs_attribute}}']//div[@aria-label='{{attribute_name}}']" parameterized="true"/>
4848
<element name="quickOrderLink" type="text" selector="//div[@class='panel header']//a[text()='Quick Order']" />
49+
<element name="productNameWithPriceOrLabel" type="text" selector="//div[@class='product details product-item-details']//a[contains(text(),'{{ProductName}}')]//parent::strong/following-sibling::div//span[contains(text(),'{{PriceLabelOrPrice}}')]" parameterized="true"/>
4950
<element name="sortByDropdownContent" type="select" selector="//select[@id='sorter']//option[contains(text(),'{{arg}}')]" parameterized="true"/>
5051
<element name="productInOrderDisplay" type="text" selector="//li[@class='item product product-item'][{{index}}]//a[@class='product-item-link' and contains(text(),'{{product_name}}')]" parameterized="true"/>
5152
</section>

0 commit comments

Comments
 (0)