forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request magento#1085 from magento-engcom/858
MSI-858: [Configuration-Stocks] Admin user applied Mass action: Delet…
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
...ode/Magento/Inventory/Test/Acceptance/Test/AdminAllStocksDeletedFromGridExceptDefault.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> | ||
<test name="AdminAllStocksDeletedFromGridExceptDefault"> | ||
<annotations> | ||
<features value="Multi-Source Inventory"/> | ||
<stories value="Delete Stock"/> | ||
<title value="Delete all Stocks from Stock Grid"/> | ||
<description value="You should be able to Delete all Stocks from the Grid except Default if it does NOT have a Sales Channel assigned."/> | ||
<testCaseId value="858"/> | ||
<severity value="CRITICAL"/> | ||
<group value="msi"/> | ||
</annotations> | ||
|
||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
|
||
<!-- need to delete all stocks previously created --> | ||
<amOnPage url="{{AdminManageStockPage.url}}" stepKey="amOnStockGridPageToDeleteAllNeedlesslyStocks"/> | ||
<waitForPageLoad time="30" stepKey="waitForStockGridLoadToDeleteAllNeedlesslyStocks"/> | ||
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearAllFilters"/> | ||
<click selector="{{AdminGridSelectRows.multicheckDropdown}}" stepKey="openMulticheckDropdownToDeleteAllNeedlesslyStocks"/> | ||
<click selector="{{AdminGridSelectRows.multicheckOption('Select All')}}" stepKey="selectAllProductInFilteredGridToDeleteAllNeedlesslyStocks"/> | ||
<click selector="{{AdminGridSelectRows.bulkActionDropdown}}" stepKey="clickActionDropdownToDeleteAllNeedlesslyStocks"/> | ||
<click selector="{{AdminGridSelectRows.bulkActionOption('Delete')}}" stepKey="clickDeleteActionToDeleteAllNeedlesslyStocks"/> | ||
<waitForElementVisible selector="{{AdminGridConfirmActionSection.title}}" stepKey="waitForConfirmModalToDeleteAllNeedlesslyStocks"/> | ||
<click selector="{{AdminGridConfirmActionSection.ok}}" stepKey="confirmStocksDeleteToDeleteAllNeedlesslyStocks"/> | ||
|
||
<createData entity="BasicMsiStock1" stepKey="createStock1"/> | ||
<createData entity="BasicMsiStock2" stepKey="createStock2"/> | ||
<createData entity="BasicMsiStock2" stepKey="createStock3"/> | ||
|
||
<amOnPage url="{{AdminManageStockPage.url}}" stepKey="amOnStockGridPage"/> | ||
<waitForPageLoad time="30" stepKey="waitForStockGridLoad"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="logout" stepKey="logoutOfAdmin"/> | ||
</after> | ||
|
||
<click selector="{{AdminGridSelectRows.multicheckDropdown}}" stepKey="openMulticheckDropdown"/> | ||
<click selector="{{AdminGridSelectRows.multicheckOption('Select All')}}" stepKey="selectAllProductInFilteredGrid"/> | ||
<click selector="{{AdminGridSelectRows.bulkActionDropdown}}" stepKey="clickActionDropdown"/> | ||
<click selector="{{AdminGridSelectRows.bulkActionOption('Delete')}}" stepKey="clickDeleteAction"/> | ||
<waitForElementVisible selector="{{AdminGridConfirmActionSection.title}}" stepKey="waitForConfirmModal"/> | ||
<click selector="{{AdminGridConfirmActionSection.ok}}" stepKey="confirmStocksDelete"/> | ||
|
||
<see selector="{{AdminMessagesSection.successMessage}}" userInput="You deleted 3 Stock(s)." stepKey="seeSuccessDeleteMessage"/> | ||
<see selector="{{AdminMessagesSection.errorMessage}}" userInput="[ID: 1] Default Stock could not be deleted." stepKey="seeErrorDeleteMessage"/> | ||
</test> | ||
</tests> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...ts/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminMessagesSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> | ||
<section name="AdminMessagesSection"> | ||
<element name="successMessage" type="text" selector=".message-success"/> | ||
<element name="errorMessage" type="text" selector=".message.message-error.error"/> | ||
</section> | ||
</sections> |