Skip to content

Commit af12fe6

Browse files
authored
Merge pull request #5475 from magento-tsg/2.4-develop-pr21
[TSG] TESTs Fixes for 2.4 (pr21) (2.4-develop)
2 parents 1a77b70 + 9c55259 commit af12fe6

File tree

37 files changed

+1205
-246
lines changed

37 files changed

+1205
-246
lines changed

app/code/Magento/Braintree/Test/Mftf/Data/BraintreeData.xml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@
5353
<data key="value">sandbox</data>
5454
</entity>
5555
<entity name="MerchantId" type="merchant_id">
56-
<data key="value">MERCH_ID</data>
56+
<data key="value">{{_CREDS.magento/braintree_enabled_fraud_merchant_id}}</data>
5757
</entity>
5858
<entity name="PublicKey" type="public_key">
59-
<data key="value">PUBLIC_KEY</data>
59+
<data key="value">{{_CREDS.magento/braintree_enabled_fraud_public_key}}</data>
6060
</entity>
6161
<entity name="PrivateKey" type="private_key">
62-
<data key="value">PRIVATE_KEY</data>
62+
<data key="value">{{_CREDS.magento/braintree_enabled_fraud_private_key}}</data>
6363
</entity>
6464

6565
<!-- default configuration used to restore Magento config -->
@@ -141,6 +141,16 @@
141141
<data key="cardNumberEnding">5100</data>
142142
<data key="cardExpire">12/2020</data>
143143
</entity>
144+
<entity name="VisaDefaultCard" type="data">
145+
<data key="cardNumber">4111111111111111</data>
146+
<data key="month">01</data>
147+
<data key="year">30</data>
148+
<data key="cvv">123</data>
149+
</entity>
150+
<entity name="VisaDefaultCardInfo">
151+
<data key="cardNumberEnding">1111</data>
152+
<data key="cardExpire">01/2030</data>
153+
</entity>
144154

145155
<entity name="BraintreeConfigurationData" type="data">
146156
<data key="title">Credit Card (Braintree)</data>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="AssertStorefrontProductAbsentOnCategoryPageActionGroup">
12+
<annotations>
13+
<description>Navigate to category page and verify product is absent.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="categoryUrlKey" defaultValue="{{_defaultCategory.url_key}}"/>
17+
<argument name="productName" defaultValue="{{SimpleProduct.name}}"/>
18+
</arguments>
19+
20+
<amOnPage url="{{StorefrontCategoryPage.url(categoryUrlKey)}}" stepKey="navigateToCategoryPage"/>
21+
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
22+
<dontSee selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{productName}}" stepKey="assertProductIsNotPresent"/>
23+
</actionGroup>
24+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontProductPageCloseFullscreenGalleryActionGroup">
11+
<annotations>
12+
<description>Closes a product image gallery full-screen page.</description>
13+
</annotations>
14+
15+
<click selector="{{StorefrontProductMediaSection.closeFullscreenImage}}" stepKey="closeFullScreenPage"/>
16+
<waitForPageLoad stepKey="waitsForCloseFullScreenPage"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontProductPageOpenImageFullscreenActionGroup">
11+
<annotations>
12+
<description>Finds image of the product in thumbnails and open a full-screen review.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="imageNumber" type="string" defaultValue="2"/>
16+
</arguments>
17+
18+
<waitForElementVisible selector="{{StorefrontProductMediaSection.fotoramaImageThumbnail(imageNumber)}}" stepKey="waitThumbnailAppears"/>
19+
<conditionalClick selector="{{StorefrontProductMediaSection.fotoramaImageThumbnail(imageNumber)}}" dependentSelector="{{StorefrontProductMediaSection.fotoramaImageThumbnailActive(imageNumber)}}" visible="false" stepKey="clickOnThumbnailImage"/>
20+
<click selector="{{StorefrontProductMediaSection.gallery}}" stepKey="openFullScreenPage"/>
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/ProductAttributeData.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,6 @@
394394
<data key="used_for_sort_by">true</data>
395395
<requiredEntity type="FrontendLabel">ProductAttributeFrontendLabel</requiredEntity>
396396
</entity>
397-
<entity name="VisualSwatchProductAttribute" type="ProductAttribute">
398-
<data key="frontend_input">swatch_visual</data>
399-
<data key="attribute_code" unique="suffix">visual_swatch</data>
400-
</entity>
401397
<entity name="ProductColorAttribute" type="ProductAttribute">
402398
<data key="frontend_label">Color</data>
403399
<data key="attribute_code" unique="suffix">color_attr</data>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<element name="modalOkBtn" type="button" selector="button.action-primary.action-accept"/>
1919
<element name="uploadProgressBar" type="text" selector=".uploader .file-row"/>
2020
<element name="productImagesToggleState" type="button" selector="[data-index='gallery'] > [data-state-collapsible='{{status}}']" parameterized="true"/>
21-
2221
<element name="nthProductImage" type="button" selector="#media_gallery_content > div:nth-child({{var}}) img.product-image" parameterized="true"/>
2322
<element name="nthRemoveImageBtn" type="button" selector="#media_gallery_content > div:nth-child({{var}}) button.action-remove" parameterized="true"/>
2423

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="StorefrontProductMediaSection">
1212
<element name="gallerySpinner" type="block" selector="#maincontent .fotorama__spinner--show" />
13-
<element name="gallery" type="block" selector="[data-gallery-role='gallery']" />
13+
<element name="gallery" type="block" selector="[data-gallery-role='gallery']" timeout="30"/>
1414
<element name="productImage" type="text" selector="//*[@data-gallery-role='gallery' and not(contains(@class, 'fullscreen'))]//img[contains(@src, '{{filename}}') and not(contains(@class, 'full'))]" parameterized="true" />
1515
<element name="productImageFullscreen" type="text" selector="//*[@data-gallery-role='gallery' and contains(@class, 'fullscreen')]//img[contains(@src, '{{filename}}') and contains(@class, 'full')]" parameterized="true" />
1616
<element name="closeFullscreenImage" type="button" selector="//*[@data-gallery-role='gallery' and contains(@class, 'fullscreen')]//*[@data-gallery-role='fotorama__fullscreen-icon']" />
@@ -19,5 +19,8 @@
1919
<element name="productImageInFotorama" type="file" selector=".fotorama__nav__shaft img[src*='{{imageName}}']" parameterized="true"/>
2020
<element name="fotoramaPrevButton" type="button" selector="//*[@data-gallery-role='gallery']//*[@data-gallery-role='nav-wrap']//*[@data-gallery-role='arrow' and contains(@class, 'fotorama__thumb__arr--left')]"/>
2121
<element name="fotoramaNextButton" type="button" selector="//*[@data-gallery-role='gallery']//*[@data-gallery-role='nav-wrap']//*[@data-gallery-role='arrow' and contains(@class, 'fotorama__thumb__arr--right')]"/>
22+
<element name="fotoramaAnyMedia" type="text" selector=".fotorama__nav__shaft img"/>
23+
<element name="fotoramaImageThumbnail" type="block" selector="//div[contains(@class, 'fotorama__nav__shaft')]//div[contains(@class, 'fotorama__nav__frame--thumb')][{{imageNumber}}]" parameterized="true" timeout="30"/>
24+
<element name="fotoramaImageThumbnailActive" type="block" selector="//div[contains(@class, 'fotorama__nav__shaft')]//div[contains(@class, 'fotorama__nav__frame--thumb') and contains(@class, 'fotorama__active')][{{imageNumber}}]" parameterized="true" timeout="30"/>
2225
</section>
2326
</sections>

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
</annotations>
2020

2121
<before>
22-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2323
</before>
24+
2425
<after>
2526
<deleteData createDataKey="createDatetimeAttribute" stepKey="deleteDatetimeAttribute"/>
2627
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct">
@@ -45,13 +46,15 @@
4546
<actionGroup ref="AddProductAttributeInProductModalActionGroup" stepKey="addDatetimeAttribute">
4647
<argument name="attributeCode" value="$createDatetimeAttribute.attribute_code$"/>
4748
</actionGroup>
48-
<!-- Flush config cache to reset product attributes in attribute set -->
49-
<magentoCLI command="cache:flush" arguments="config" stepKey="flushConfigCache"/>
5049
<!-- Save the product -->
5150
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
51+
<!-- Flush config cache to reset product attributes in attribute set -->
52+
<magentoCLI command="cache:flush" arguments="config" stepKey="flushConfigCache"/>
53+
<reloadPage stepKey="reloadProductEditPage"/>
5254
<!-- Check default value -->
53-
<scrollTo selector="{{AdminProductAttributesSection.sectionHeader}}" stepKey="goToAttributesSection"/>
54-
<click selector="{{AdminProductAttributesSection.sectionHeader}}" stepKey="openAttributesSection"/>
55+
<waitForElementVisible selector="{{AdminProductAttributesSection.sectionHeader}}" stepKey="waitAttributesSectionAppears"/>
56+
<conditionalClick selector="{{AdminProductAttributesSection.sectionHeader}}" dependentSelector="{{AdminProductAttributesSection.attributeTextInputByCode($createDatetimeAttribute.attribute_code$)}}" visible="false" stepKey="openAttributesSection"/>
57+
<scrollTo selector="{{AdminProductAttributesSection.sectionHeader}}" stepKey="scrollToAttributesSection"/>
5558
<waitForElementVisible selector="{{AdminProductAttributesSection.attributeTextInputByCode($createDatetimeAttribute.attribute_code$)}}" stepKey="waitForSlideOutAttributes"/>
5659
<seeInField selector="{{AdminProductAttributesSection.attributeTextInputByCode($createDatetimeAttribute.attribute_code$)}}" userInput="$generateDefaultValue" stepKey="checkDefaultValue"/>
5760
<!-- Check datetime grid filter -->

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
<stories value="Recently Viewed Product"/>
1313
<title value="Recently Viewed Product at store level"/>
1414
<description value="Recently Viewed Product should not be displayed on second store , if configured as, Per Store "/>
15-
<testCaseId value="MC-32018"/>
15+
<testCaseId value="MC-32226"/>
1616
<severity value="CRITICAL"/>
1717
<group value="catalog"/>
18+
<group value="WYSIWYGDisabled"/>
1819
</annotations>
1920
<before>
2021
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
@@ -163,4 +164,4 @@
163164
<assertNotContains expected="$$createSimpleProduct1.name$$" actual="$grabDontSeeHomeProduct1" stepKey="assertNotSeeProduct1"/>
164165

165166
</test>
166-
</tests>
167+
</tests>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
<stories value="Recently Viewed Product"/>
1313
<title value="Recently Viewed Product at store view level"/>
1414
<description value="Recently Viewed Product should not be displayed on second store view, if configured as, Per Store View "/>
15-
<testCaseId value="MC-31877"/>
15+
<testCaseId value="MC-32112"/>
1616
<severity value="CRITICAL"/>
1717
<group value="catalog"/>
18+
<group value="WYSIWYGDisabled"/>
1819
</annotations>
1920
<before>
2021
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

0 commit comments

Comments
 (0)