Skip to content

Commit 663ffa0

Browse files
GlobalManjusha.S
authored andcommitted
MQE-3543-3.0 | chrome update
1 parent f9ca750 commit 663ffa0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/code/Magento/Swatches/Test/Mftf/ActionGroup/AssertStorefrontSwatchColorActionGroup.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
<argument name="expectedRgb" type="string" defaultValue="rgb(231, 77, 60)"/>
1818
</arguments>
1919

20-
<grabAttributeFrom selector="{{StorefrontProductInfoMainSection.nthSwatchOption(nthSwatch)}}" userInput="style" stepKey="grabStyle1"/>
20+
<executeJS function="return document.evaluate(&quot;//div[@class='swatch-option color'][{{nthSwatch}}]&quot;,
21+
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.style.cssText" stepKey="returnRGB" />
2122
<assertEquals stepKey="assertStyle1">
22-
<actualResult type="string">{$grabStyle1}</actualResult>
23+
<actualResult type="string">{$returnRGB}</actualResult>
2324
<expectedResult type="string">background: center center no-repeat {{expectedRgb}};</expectedResult>
2425
</assertEquals>
2526
</actionGroup>

app/code/Magento/Swatches/Test/Mftf/ActionGroup/AssertSwatchColorActionGroup.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
<argument name="expectedStyle" type="string" defaultValue="background: rgb(0, 0, 0);"/>
1717
</arguments>
1818

19-
<grabAttributeFrom selector="{{AdminManageSwatchSection.nthSwatch(nthSwatch)}}" userInput="style" stepKey="grabStyle1"/>
19+
<executeJS function="return document.evaluate(&quot;//tbody[@data-role='swatch-visual-options-container']//tr[{{nthSwatch}}]//td[@class='swatches-visual-col col-default ']//div[@class='swatch_window']&quot;,
20+
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.style.cssText" stepKey="returnRGB" />
2021
<assertEquals stepKey="assertStyle1">
21-
<actualResult type="string">{$grabStyle1}</actualResult>
22+
<actualResult type="string">{$returnRGB}</actualResult>
2223
<expectedResult type="string">{{expectedStyle}}</expectedResult>
2324
</assertEquals>
2425
</actionGroup>

0 commit comments

Comments
 (0)