Skip to content

Commit

Permalink
Merge pull request #85 from magento-tsg/MC-41101
Browse files Browse the repository at this point in the history
[Arrows] MC-41101: [MFTF][MSI] AdminManageStockOnConfigurationPageTurnedOffFor…
  • Loading branch information
zakdma authored Mar 2, 2021
2 parents 2a65577 + c3474da commit 62a4643
Showing 1 changed file with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</annotations>

<before>
<magentoCLI command="config:set {{TurnOnManageStockConfig.path}} {{TurnOnManageStockConfig.value}}" stepKey="enableStockManagement"/>
<!--Create test data.-->
<createData entity="MsiCustomer1" stepKey="customer"/>
<createData entity="FullSource1" stepKey="additionalSource"/>
Expand All @@ -30,21 +31,23 @@
<requiredEntity createDataKey="additionalSource"/>
</createData>
<createData entity="SimpleSubCategory" stepKey="category"/>
<createData entity="GroupedProduct" stepKey="groupedProduct">
<field key="name">CustomGroupedProduct</field>
</createData>
<createData entity="GroupedProduct" stepKey="groupedProduct"/>
<createData entity="SimpleProduct" stepKey="simpleProduct">
<requiredEntity createDataKey="category"/>
</createData>
<createData entity="VirtualProduct" stepKey="virtualProduct">
<requiredEntity createDataKey="category"/>
</createData>
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
<argument name="tags" value=""/>
</actionGroup>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<!--Disable additional source.-->
<actionGroup ref="DisableSourceActionGroup" stepKey="disableAdditionalSource">
<argument name="sourceCode" value="$$additionalSource.source[source_code]$$"/>
<argument name="sourceCode" value="$additionalSource.source[source_code]$"/>
</actionGroup>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
<!--Clean up created data.-->
Expand All @@ -57,48 +60,50 @@

<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="openProductGrid2"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProduct2">
<argument name="product" value="$$groupedProduct$$"/>
<argument name="product" value="$groupedProduct$"/>
</actionGroup>

<actionGroup ref="OpenProductForEditByClickingRowXColumnYInProductGridActionGroup" stepKey="openSecondProductForEdit"/>
<actionGroup ref="AdminAssignProductToGroupActionGroup" stepKey="addFirstSimpleToGroup">
<argument name="product" value="$$simpleProduct$$"/>
<argument name="product" value="$simpleProduct$"/>
</actionGroup>

<actionGroup ref="FillDefaultQuantityForLinkedToGroupProductInGridActionGroup" stepKey="fillDefaultQtyForVirtualProduct1">
<argument name="productName" value="$$simpleProduct.name$$"/>
<argument name="productName" value="$simpleProduct.name$"/>
<argument name="qty" value="2"/>
</actionGroup>

<actionGroup ref="AdminAssignProductToGroupActionGroup" stepKey="addSecondSimpleToGroup">
<argument name="product" value="$$virtualProduct$$"/>
<argument name="product" value="$virtualProduct$"/>
</actionGroup>

<actionGroup ref="FillDefaultQuantityForLinkedToGroupProductInGridActionGroup" stepKey="fillDefaultQtyForVirtualProduct2">
<argument name="productName" value="$$virtualProduct.name$$"/>
<argument name="productName" value="$virtualProduct.name$"/>
<argument name="qty" value="2"/>
</actionGroup>

<selectOption selector="{{AdminProductFormBundleSection.stockStatusField}}" userInput="Out of Stock" stepKey="stockStatus"/>

<scrollToTopOfPage stepKey="scrollOnTopOfProductPagePage"/>
<actionGroup ref="AdminAssignCategoryToProductAndSaveActionGroup" stepKey="assignCategoryToProduct">
<argument name="categoryName" value="$$category.name$$"/>
<argument name="categoryName" value="$category.name$"/>
</actionGroup>

<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage"/>
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName">
<argument name="phrase" value="$$groupedProduct.sku$$"/>
<argument name="phrase" value="$groupedProduct.name$"/>
</actionGroup>
<dontSee userInput="$$groupedProduct.name$$" stepKey="verifyProductNotPresentOnStorefront"/>
<dontSee selector="{{StorefrontCatalogSearchMainSection.searchResults}}" userInput="$groupedProduct.name$" stepKey="verifyProductNotPresentOnStorefront"/>
<magentoCLI command="config:set {{TurnOffManageStockConfig.path}} {{TurnOffManageStockConfig.value}}" stepKey="manageStockToNo"/>
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
<magentoCLI command="cache:flush" stepKey="flushCache"/>
<actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache">
<argument name="tags" value=""/>
</actionGroup>

<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="openStoreFrontHomePage2"/>
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductName2">
<argument name="phrase" value="$$groupedProduct.sku$$"/>
<argument name="phrase" value="$groupedProduct.name$"/>
</actionGroup>
<see userInput="$$groupedProduct.name$$" stepKey="verifyProductPresentOnStorefront"/>
<see selector="{{StorefrontCatalogSearchMainSection.searchResults}}" userInput="$groupedProduct.name$" stepKey="verifyProductPresentOnStorefront"/>
</test>
</tests>

0 comments on commit 62a4643

Please sign in to comment.