Skip to content

Commit 8c9d87e

Browse files
committed
B2B-1650: Add MFTF test for MC-38248
- Fixing tests that are causing PR failures
1 parent 40c550a commit 8c9d87e

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@
2626
<magentoCron stepKey="runCronIndex" groups="index"/>
2727
</before>
2828
<after>
29-
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
3029
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
3130
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
3231
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
32+
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteBundleProduct">
33+
<argument name="sku" value="{{BundleProduct.sku}}"/>
34+
</actionGroup>
35+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilter"/>
36+
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
3337
</after>
3438
<!--Go to bundle product creation page-->
3539
<amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage" />

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<section name="StorefrontProductMediaSection">
1212
<element name="gallerySpinner" type="block" selector="#maincontent .fotorama__spinner--show" />
1313
<element name="gallery" type="block" selector="[data-gallery-role='gallery']" timeout="30"/>
14+
<element name="galleryNoControlsElement" type="block" selector=".fotorama__wrap.fotorama__wrap--no-controls"/>
1415
<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" />
1516
<element name="productImageFullscreen" type="text" selector="//*[@data-gallery-role='gallery' and contains(@class, 'fullscreen')]//img[contains(@src, '{{filename}}') and contains(@class, 'full')]" parameterized="true" />
1617
<element name="closeFullscreenImage" type="button" selector="//*[@data-gallery-role='gallery' and contains(@class, 'fullscreen')]//*[@data-gallery-role='fotorama__fullscreen-icon']" />

app/code/Magento/ProductVideo/Test/Mftf/ActionGroup/AssertProductVideoNavigationArrowsActionGroup.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,27 @@
1919

2020
<dontSeeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="dontSeePrevButton"/>
2121
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOverImage"/>
22-
<seeElement selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="seeNextButton"/>
22+
<waitForElementVisible selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="seeNextButton"/>
2323
<click selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="clickNextButton"/>
24-
<seeElement selector="{{StorefrontProductInfoMainSection.productVideo(videoType)}}" stepKey="seeProductVideoDataType"/>
24+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.productVideo(videoType)}}" stepKey="seeProductVideoDataType"/>
2525

2626
<dontSeeElement selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="dontSeeCloseVideo"/>
2727

2828
<click selector="{{StorefrontProductInfoMainSection.clickPlayVideo}}" stepKey="clickToPlayVideo"/>
29-
<wait stepKey="waitFiveSecondsToPlayVideo" time="5"/>
29+
<wait time="5" stepKey="waitFiveSecondsToPlayVideo"/>
3030

3131
<dontSeeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="dontSeePrevButtonSecond"/>
3232
<dontSeeElement selector="{{StorefrontProductMediaSection.imageNextButton}}" stepKey="dontSeeNextButton"/>
3333

3434
<seeElement selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="seeCloseVideo"/>
3535
<click selector="{{StorefrontProductInfoMainSection.clickCloseVideo}}" stepKey="clickToCloseVideo"/>
36-
<wait stepKey="waitTwoSecondsToCloseVideo" time="2"/>
36+
<wait time="2" stepKey="waitTwoSecondsToCloseVideo"/>
37+
<dontSeeElementInDOM selector="{{StorefrontProductMediaSection.galleryNoControlsElement}}" stepKey="videoFocused"/>
38+
<moveMouseOver selector="{{StorefrontCMSPageSection.mainTitle}}" stepKey="unFocusVideo"/>
39+
<waitForElement selector="{{StorefrontProductMediaSection.galleryNoControlsElement}}" stepKey="waitForVideoUnFocus"/>
3740

3841
<moveMouseOver selector="{{StorefrontProductMediaSection.mainImageForJsActions}}" stepKey="hoverOverImageSecond"/>
39-
<seeElement selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="seePrevButton"/>
42+
<waitForElementVisible selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="seePrevButton"/>
4043
<click selector="{{StorefrontProductMediaSection.imagePrevButton}}" stepKey="clickPrevButton"/>
4144
</actionGroup>
4245
</actionGroups>

0 commit comments

Comments
 (0)