|
11 | 11 | <test name="AdminFixedTaxValSavedForSpecificWebsiteTest">
|
12 | 12 | <annotations>
|
13 | 13 | <features value="Tax"/>
|
14 |
| - <title value="Cannot Save FPT (Fixed Product Tax) On Catalog Product For Specific Website"/> |
15 |
| - <description value="Cannot Save FPT (Fixed Product Tax) On Catalog Product For Specific Website"/> |
| 14 | + <title value="Fixed Product Tax value is saved correctly for Specific Website"/> |
| 15 | + <description value="Fixed Product Tax value is saved correctly for Specific Website"/> |
16 | 16 | <severity value="MAJOR"/>
|
17 | 17 | <testCaseId value="MC-17182"/>
|
18 | 18 | <useCaseId value=" MC-17014"/>
|
|
47 | 47 | <argument name="StoreGroup" value="NewStoreData"/>
|
48 | 48 | <argument name="customStore" value="storeViewData"/>
|
49 | 49 | </actionGroup>
|
| 50 | + <!--Set catalog price scope to Global--> |
| 51 | + <comment userInput="Set catalog price scope to Global" stepKey="commentSetPriceScope"/> |
| 52 | + <magentoCLI command="config:set catalog/price/scope 0" stepKey="setPriceScopeGlobal"/> |
| 53 | + <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
| 54 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
50 | 55 | </before>
|
51 | 56 | <after>
|
| 57 | + <!--Set catalog price scope to Global--> |
| 58 | + <comment userInput="Set catalog price scope to Global" stepKey="commentSetPriceScope"/> |
| 59 | + <magentoCLI command="config:set catalog/price/scope 0" stepKey="setPriceScopeGlobal"/> |
| 60 | + <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
| 61 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
52 | 62 | <!-- Delete created data and log out -->
|
53 | 63 | <comment userInput="Delete created data and log out" stepKey="deleteDataAndLogOut"/>
|
54 | 64 | <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
|
|
62 | 72 | <!-- Go to product edit page and assign it to created website -->
|
63 | 73 | <comment userInput="Go to product edit page and assign it to created website" stepKey="assignProductToCreatedWebsite"/>
|
64 | 74 | <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="navigateToProductPage"/>
|
65 |
| - <actionGroup ref="attachOneWebsiteToProductActionGroup" stepKey="updateSimpleProductAddingWebsiteCreated"> |
| 75 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 76 | + <actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectWebsiteInProduct"> |
66 | 77 | <argument name="website" value="{{NewWebSiteData.name}}"/>
|
67 | 78 | </actionGroup>
|
| 79 | + <actionGroup ref="saveProductForm" stepKey="saveProductFirstTime"/> |
68 | 80 | <!-- Add Fixed Product Tax attribute -->
|
69 | 81 | <comment userInput="Add Fixed Product Tax attribute" stepKey="addFixedProdTaxAttr"/>
|
70 | 82 | <actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFixedProductTaxAttr">
|
71 | 83 | <argument name="FPTAttributeCode" value="$$createProductFPTAttribute.attribute_code$$"/>
|
72 | 84 | <argument name="stateForFPT" value="California"/>
|
73 | 85 | <argument name="valueForFPT" value="10"/>
|
74 | 86 | </actionGroup>
|
75 |
| - <actionGroup ref="saveProductForm" stepKey="saveProduct"/> |
| 87 | + <actionGroup ref="saveProductForm" stepKey="saveProductSecondTime"/> |
76 | 88 | <!-- Check if created tax attribute is saved -->
|
77 | 89 | <comment userInput="Check if created tax attribute is saved" stepKey="checkThatTaxAttributeIsSaved"/>
|
78 | 90 | <seeElement selector="{{AdminProductAddFPTValueSection.setTaxValueForFPT($$createProductFPTAttribute.attribute_code$$)}}" stepKey="checkIfTaxAttributeSaved"/>
|
| 91 | + <!--See available websites only 'All Websites'--> |
| 92 | + <comment userInput="See available websites only 'All Websites'" stepKey="commentCheckWebsitesDropDown"/> |
| 93 | + <seeElement selector="{{AdminProductAddFPTValueSection.setWebSiteForFPTOption($$createProductFPTAttribute.attribute_code$$, 'All Websites')}}" stepKey="seeAllWebsites"/> |
| 94 | + <dontSeeElement selector="{{AdminProductAddFPTValueSection.setWebSiteForFPTOption($$createProductFPTAttribute.attribute_code$$, NewWebSiteData.name)}}" stepKey="dontSeeSecondWebsite"/> |
| 95 | + <dontSeeElement selector="{{AdminProductAddFPTValueSection.setWebSiteForFPTOption($$createProductFPTAttribute.attribute_code$$, 'Main Website')}}" stepKey="dontSeeMainWebsite"/> |
| 96 | + <!--Set catalog price scope to Website--> |
| 97 | + <comment userInput="Set catalog price scope to Website" stepKey="commentSetPriceScope"/> |
| 98 | + <magentoCLI command="config:set catalog/price/scope 1" stepKey="setPriceScopeWebsite"/> |
| 99 | + <magentoCLI command="indexer:reindex" stepKey="reindex"/> |
| 100 | + <magentoCLI command="cache:flush" stepKey="flushCache"/> |
| 101 | + <!--See available websites only 'All Websites'--> |
| 102 | + <comment userInput="See available websites 'All Websites', 'Main Website' and Second website" stepKey="commentCheckWebsitesInProductPage"/> |
| 103 | + <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="goToProductPageSecondTime"/> |
| 104 | + <waitForPageLoad stepKey="waitForProductPageLoadSecondTime"/> |
| 105 | + <seeElement selector="{{AdminProductAddFPTValueSection.setWebSiteForFPTOption($$createProductFPTAttribute.attribute_code$$, 'All Websites')}}" stepKey="checkAllWebsitesInDropDown"/> |
| 106 | + <seeElement selector="{{AdminProductAddFPTValueSection.setWebSiteForFPTOption($$createProductFPTAttribute.attribute_code$$, 'Main Website')}}" stepKey="checkMainWebsiteInDropDown"/> |
| 107 | + <seeElement selector="{{AdminProductAddFPTValueSection.setWebSiteForFPTOption($$createProductFPTAttribute.attribute_code$$, NewWebSiteData.name)}}" stepKey="checkSecondWebsitesInDropDown"/> |
| 108 | + <actionGroup ref="unassignWebsiteFromProductActionGroup" stepKey="unassignWebsiteInProduct"> |
| 109 | + <argument name="website" value="{{_defaultWebsite.name}}"/> |
| 110 | + </actionGroup> |
| 111 | + <actionGroup ref="saveProductForm" stepKey="saveProductThirdTime"/> |
| 112 | + <waitForPageLoad stepKey="waitForSavedProductLoad"/> |
| 113 | + <seeElement selector="{{AdminProductAddFPTValueSection.setWebSiteForFPTOption($$createProductFPTAttribute.attribute_code$$, 'All Websites')}}" stepKey="checkAllWebsitesInDropDownSecondTime"/> |
| 114 | + <dontSeeElement selector="{{AdminProductAddFPTValueSection.setWebSiteForFPTOption($$createProductFPTAttribute.attribute_code$$, 'Main Website')}}" stepKey="checkNoMainWebsiteInDropDown"/> |
| 115 | + <seeElement selector="{{AdminProductAddFPTValueSection.setWebSiteForFPTOption($$createProductFPTAttribute.attribute_code$$, NewWebSiteData.name)}}" stepKey="checkSecondWebsitesInDropDownSecondTime"/> |
79 | 116 | </test>
|
80 | 117 | </tests>
|
0 commit comments