Skip to content

Commit dfd785f

Browse files
committed
Refactoring the delete action group
1 parent c708a26 commit dfd785f

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminClickDeleteMainButtonWithConfirmationActionGroup">
12+
<waitForElementVisible selector="{{AdminMainActionsSection.delete}}" stepKey="waitForDeleteButton"/>
13+
<click selector="{{AdminMainActionsSection.delete}}" stepKey="clickDeleteButton"/>
14+
<waitForText userInput="Are you sure you want to do this?" stepKey="waitForText"/>
15+
<click selector="{{AdminMainActionsSection.confirmDelete}}" stepKey="confirmDelete"/>
16+
<waitForPageLoad stepKey="waitForPageLoad3"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
<element name="saveAndContinue" type="button" selector="button[id*=save_and_continue]" timeout="30"/>
1414
<element name="delete" type="button" selector="#delete" timeout="30"/>
1515
<element name="add" type="button" selector="#add" timeout="30"/>
16+
<element name="cancelDelete" type="button" selector=".modal-popup.confirm button.action-dismiss" timeout="10"/>
17+
<element name="confirmDelete" type="button" selector=".modal-popup.confirm button.action-accept" timeout="10"/>
1618
</section>
1719
</sections>

app/code/Magento/Variable/Test/Mftf/ActionGroup/AdminDeleteCustomVariableActionGroup.xml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)