Skip to content

Commit 07dcbc3

Browse files
committed
MC-17014: Cannot Save FPT (Fixed Product Tax) On Catalog Product For Specific Website
- Update automated test script.
1 parent 569cf0f commit 07dcbc3

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

app/code/Magento/Tax/Test/Mftf/Test/AdminFixedTaxValSavedForSpecificWebsiteTest.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
<argument name="StoreGroup" value="NewStoreData"/>
4848
<argument name="customStore" value="storeViewData"/>
4949
</actionGroup>
50+
<magentoCLI command="config:set catalog/price/scope 0" stepKey="setPriceScopeGlobal"/>
51+
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
52+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
5053
</before>
5154
<after>
5255
<!-- Delete created data and log out -->
@@ -76,5 +79,11 @@
7679
<!-- Check if created tax attribute is saved -->
7780
<comment userInput="Check if created tax attribute is saved" stepKey="checkThatTaxAttributeIsSaved"/>
7881
<seeElement selector="{{AdminProductAddFPTValueSection.setTaxValueForFPT($$createProductFPTAttribute.attribute_code$$)}}" stepKey="checkIfTaxAttributeSaved"/>
82+
<selectOption selector="{{AdminProductAddFPTValueSection.setWebSiteForFPT($$createProductFPTAttribute.attribute_code$$)}}" userInput="All Websites USD" stepKey="selectAllWebsites"/>
83+
<grabTextFrom selector="{{AdminProductAddFPTValueSection.setWebSiteForFPT($$createProductFPTAttribute.attribute_code$$)}}" stepKey="grabAllWebsites"/>
84+
<assertContains expectedType="string" expected="All Websites USD" actualType="variable" actual="$grabAllWebsites" stepKey="assertContainsAllWebsites"/>
85+
<selectOption selector="{{AdminProductAddFPTValueSection.setWebSiteForFPT($$createProductFPTAttribute.attribute_code$$)}}" userInput="{{NewWebSiteData.name}} USD" stepKey="selectSecondWebsite"/>
86+
<grabTextFrom selector="{{AdminProductAddFPTValueSection.setWebSiteForFPT($$createProductFPTAttribute.attribute_code$$)}}" stepKey="grabSecondWebsite"/>
87+
<assertContains expectedType="string" expected="{{NewWebSiteData.name}}" actualType="variable" actual="$grabSecondWebsite" stepKey="assertContainsSecondWebsite"/>
7988
</test>
8089
</tests>

app/code/Magento/Weee/Test/Mftf/Section/AdminProductAddFPTValueSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
<element name="selectCountryForFPT" type="select" selector="(//select[contains(@name, 'product[{{FPTAttributeCode}}]') and contains(@name, '[country]')])[last()]" parameterized="true"/>
1515
<element name="selectStateForFPT" type="select" selector="(//select[contains(@name, 'product[{{FPTAttributeCode}}]') and contains(@name, '[state]')])[last()]" parameterized="true"/>
1616
<element name="setTaxValueForFPT" type="text" selector="(//input[contains(@name, 'product[{{FPTAttributeCode}}]') and contains(@name, '[value]')])[last()]" parameterized="true"/>
17+
<element name="setWebSiteForFPT" type="text" selector="(//select[contains(@name, 'product[{{FPTAttributeCode}}]') and contains(@name, '[website_id]')])[last()]" parameterized="true"/>
1718
</section>
1819
</sections>

0 commit comments

Comments
 (0)