|
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"/> |
50 | 52 | <magentoCLI command="config:set catalog/price/scope 0" stepKey="setPriceScopeGlobal"/>
|
51 | 53 | <magentoCLI command="indexer:reindex" stepKey="reindex"/>
|
52 | 54 | <magentoCLI command="cache:flush" stepKey="flushCache"/>
|
53 | 55 | </before>
|
54 | 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"/> |
55 | 62 | <!-- Delete created data and log out -->
|
56 | 63 | <comment userInput="Delete created data and log out" stepKey="deleteDataAndLogOut"/>
|
57 | 64 | <deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
|
|
65 | 72 | <!-- Go to product edit page and assign it to created website -->
|
66 | 73 | <comment userInput="Go to product edit page and assign it to created website" stepKey="assignProductToCreatedWebsite"/>
|
67 | 74 | <amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="navigateToProductPage"/>
|
68 |
| - <actionGroup ref="attachOneWebsiteToProductActionGroup" stepKey="updateSimpleProductAddingWebsiteCreated"> |
| 75 | + <waitForPageLoad stepKey="waitForProductPageLoad"/> |
| 76 | + <actionGroup ref="SelectProductInWebsitesActionGroup" stepKey="selectWebsiteInProduct"> |
69 | 77 | <argument name="website" value="{{NewWebSiteData.name}}"/>
|
70 | 78 | </actionGroup>
|
| 79 | + <actionGroup ref="saveProductForm" stepKey="saveProductFirstTime"/> |
71 | 80 | <!-- Add Fixed Product Tax attribute -->
|
72 | 81 | <comment userInput="Add Fixed Product Tax attribute" stepKey="addFixedProdTaxAttr"/>
|
73 | 82 | <actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFixedProductTaxAttr">
|
74 | 83 | <argument name="FPTAttributeCode" value="$$createProductFPTAttribute.attribute_code$$"/>
|
75 | 84 | <argument name="stateForFPT" value="California"/>
|
76 | 85 | <argument name="valueForFPT" value="10"/>
|
77 | 86 | </actionGroup>
|
78 |
| - <actionGroup ref="saveProductForm" stepKey="saveProduct"/> |
| 87 | + <actionGroup ref="saveProductForm" stepKey="saveProductSecondTime"/> |
79 | 88 | <!-- Check if created tax attribute is saved -->
|
80 | 89 | <comment userInput="Check if created tax attribute is saved" stepKey="checkThatTaxAttributeIsSaved"/>
|
81 | 90 | <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"/> |
| 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"/> |
88 | 116 | </test>
|
89 | 117 | </tests>
|
0 commit comments