Skip to content

Commit 4682784

Browse files
committed
B2B-1967: [AWS Aurora] [MFTF]: Investigate CE Build Test Failures
- Addressing CR feedback
1 parent bf8624a commit 4682784

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616
<argument name="sku"/>
1717
</arguments>
1818

19-
<!--Scroll up to avoid error-->
20-
<scrollTo selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" x="0" y="-100" stepKey="scrollTo"/>
19+
<!--Scroll to element to avoid test order flakiness-->
20+
<waitForElement selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" stepKey="waitForSection"/>
21+
<executeJS function="return document.evaluate(&quot;{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}&quot;, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.getBoundingClientRect().y" stepKey="sectionPosition"/>
22+
<executeJS function="return document.querySelector(&quot;{{AdminHeaderSection.pageMainActions}}&quot;).getBoundingClientRect().height" stepKey="floatingHeaderHeight"/>
23+
<executeJS function="window.scrollTo({top: {$sectionPosition}-{$floatingHeaderHeight}})" stepKey="scrollTo"/>
2124
<conditionalClick selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" dependentSelector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDependent}}" visible="false" stepKey="openDropDownIfClosedRelatedUpSellCrossSell"/>
2225
<waitForPageLoad stepKey="waitForSectionExpanded"/>
2326
<click selector="{{AdminProductFormRelatedUpSellCrossSellSection.AddRelatedProductsButton}}" stepKey="clickAddRelatedProductButton"/>

0 commit comments

Comments
 (0)