Skip to content

Commit 1e25d77

Browse files
author
roman
committed
Merge branch 'MAGETWO-92163' of github.com:magento-qwerty/magento2ce into MAGETWO-92163
2 parents e1e2016 + 460afed commit 1e25d77

File tree

19 files changed

+319
-40
lines changed

19 files changed

+319
-40
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminAddImageToWYSIWYGProductTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<description value="Admin should be able to add image to WYSIWYG Editor on Product Page"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-84375"/>
19+
<skip>
20+
<issueId value="MAGETWO-94438"/>
21+
</skip>
1922
</annotations>
2023
<before>
2124
<actionGroup ref="LoginActionGroup" stepKey="login"/>

app/code/Magento/Cms/Block/Adminhtml/Block/Edit/DeleteButton.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class DeleteButton extends GenericButton implements ButtonProviderInterface
1414
{
1515
/**
16-
* @return array
16+
* @inheritDoc
1717
*/
1818
public function getButtonData()
1919
{
@@ -24,14 +24,16 @@ public function getButtonData()
2424
'class' => 'delete',
2525
'on_click' => 'deleteConfirm(\'' . __(
2626
'Are you sure you want to do this?'
27-
) . '\', \'' . $this->getDeleteUrl() . '\')',
27+
) . '\', \'' . $this->getDeleteUrl() . '\', {"data": {}})',
2828
'sort_order' => 20,
2929
];
3030
}
3131
return $data;
3232
}
3333

3434
/**
35+
* URL to send delete requests to.
36+
*
3537
* @return string
3638
*/
3739
public function getDeleteUrl()

app/code/Magento/Cms/Block/Adminhtml/Page/Edit/DeleteButton.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class DeleteButton extends GenericButton implements ButtonProviderInterface
1414
{
1515
/**
16-
* @return array
16+
* @inheritDoc
1717
*/
1818
public function getButtonData()
1919
{
@@ -24,14 +24,16 @@ public function getButtonData()
2424
'class' => 'delete',
2525
'on_click' => 'deleteConfirm(\'' . __(
2626
'Are you sure you want to do this?'
27-
) . '\', \'' . $this->getDeleteUrl() . '\')',
27+
) . '\', \'' . $this->getDeleteUrl() . '\', {"data": {}})',
2828
'sort_order' => 20,
2929
];
3030
}
3131
return $data;
3232
}
3333

3434
/**
35+
* Url to send delete requests to.
36+
*
3537
* @return string
3638
*/
3739
public function getDeleteUrl()

app/code/Magento/Cms/Test/Mftf/ActionGroup/SearchBlockOnGridPageActionGroup.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,27 @@
1616
<waitForLoadingMaskToDisappear stepKey="waitForSecondIdSortDescendingToFinish2" />
1717
<waitForElementVisible selector="{{WidgetSection.BlockPage(Block.identifier)}}" stepKey="waitForBlockTitle" />
1818
</actionGroup>
19+
<actionGroup name ="deleteBlock">
20+
<arguments>
21+
<argument name="Block" defaultValue=""/>
22+
</arguments>
23+
<amOnPage url="{{CmsBlocksPage.url}}" stepKey="navigateToCMSBlocksGrid"/>
24+
<waitForPageLoad stepKey="waitForPageLoad1"/>
25+
<conditionalClick selector="{{BlockPageActionsSection.clearAll}}" dependentSelector="{{BlockPageActionsSection.activeFilters}}" stepKey="clickToResetFilter" visible="true"/>
26+
<waitForPageLoad stepKey="waitForPageLoad2"/>
27+
<click selector="{{BlockPageActionsSection.FilterBtn}}" stepKey="clickFilterBtn"/>
28+
<fillField selector="{{BlockPageActionsSection.URLKey}}" userInput="{{Block.identifier}}" stepKey="fillBlockIdentifierInput"/>
29+
<click selector="{{BlockPageActionsSection.ApplyFiltersBtn}}" stepKey="applyFilter"/>
30+
<waitForLoadingMaskToDisappear stepKey="waitForGridToLoadResults" />
31+
<waitForElementVisible selector="{{BlockPageActionsSection.select(Block.identifier)}}" stepKey="waitForCMSPageGrid" />
32+
<click selector="{{BlockPageActionsSection.select(Block.identifier)}}" stepKey="clickSelect" />
33+
<waitForElementVisible selector="{{BlockPageActionsSection.edit(Block.identifier)}}" stepKey="waitForEditLink" />
34+
<click selector="{{BlockPageActionsSection.edit(Block.identifier)}}" stepKey="clickEdit" />
35+
<waitForLoadingMaskToDisappear stepKey="waitForPageToLoad" />
36+
<click selector="{{CmsBlockBlockActionSection.deleteBlock}}" stepKey="deleteBlock"/>
37+
<waitForElementVisible selector="{{CmsBlockBlockActionSection.deleteConfirm}}" stepKey="waitForOkButtonToBeVisible"/>
38+
<click selector="{{CmsBlockBlockActionSection.deleteConfirm}}" stepKey="clickOkButton"/>
39+
<waitForPageLoad stepKey="waitForPageLoad3"/>
40+
<see userInput="You deleted the block." stepKey="seeSuccessMessage"/>
41+
</actionGroup>
1942
</actionGroups>

app/code/Magento/Cms/Test/Mftf/Section/CmsNewBlockBlockActionsSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@
2424
<section name="BlockContentSection">
2525
<element name="TextArea" type="input" selector="#cms_block_form_content"/>
2626
</section>
27+
<section name="CmsBlockBlockActionSection">
28+
<element name="deleteBlock" type="button" selector="#delete" timeout="30"/>
29+
<element name="deleteConfirm" type="button" selector=".action-primary.action-accept" timeout="60"/>
30+
</section>
2731
</sections>

app/code/Magento/Cms/Test/Mftf/Test/AdminCreateCmsBlockTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
<actionGroup ref="DisabledWYSIWYG" stepKey="disableWYSIWYG"/>
2424
</before>
2525
<after>
26+
<actionGroup ref="deleteBlock" stepKey="deleteCreatedBlock">
27+
<argument name="Block" value="_defaultBlock"/>
28+
</actionGroup>
2629
<actionGroup ref="logout" stepKey="logout"/>
2730
</after>
2831
<amOnPage url="{{CmsNewBlock.url}}" stepKey="amOnBlocksCreationForm"/>

app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/BlockActionsTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public function testPrepareDataSource()
9595
'title' => __('Delete %1', $title),
9696
'message' => __('Are you sure you want to delete a %1 record?', $title)
9797
],
98+
'post' => true
9899
]
99100
],
100101
]

app/code/Magento/Cms/Test/Unit/Ui/Component/Listing/Column/PageActionsTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public function testPrepareItemsByPageId()
7070
'title' => __('Delete %1', $title),
7171
'message' => __('Are you sure you want to delete a %1 record?', $title)
7272
],
73+
'post' => true
7374
]
7475
],
7576
]

app/code/Magento/Cms/Ui/Component/Listing/Column/BlockActions.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ public function __construct(
5555
}
5656

5757
/**
58-
* Prepare Data Source
59-
*
60-
* @param array $dataSource
61-
* @return array
58+
* @inheritDoc
6259
*/
6360
public function prepareDataSource(array $dataSource)
6461
{
@@ -87,7 +84,8 @@ public function prepareDataSource(array $dataSource)
8784
'confirm' => [
8885
'title' => __('Delete %1', $title),
8986
'message' => __('Are you sure you want to delete a %1 record?', $title)
90-
]
87+
],
88+
'post' => true
9189
]
9290
];
9391
}
@@ -99,6 +97,7 @@ public function prepareDataSource(array $dataSource)
9997

10098
/**
10199
* Get instance of escaper
100+
*
102101
* @return Escaper
103102
* @deprecated 101.0.7
104103
*/

app/code/Magento/Cms/Ui/Component/Listing/Column/PageActions.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ public function __construct(
6767
}
6868

6969
/**
70-
* Prepare Data Source
71-
*
72-
* @param array $dataSource
73-
* @return array
70+
* @inheritDoc
7471
*/
7572
public function prepareDataSource(array $dataSource)
7673
{
@@ -89,7 +86,8 @@ public function prepareDataSource(array $dataSource)
8986
'confirm' => [
9087
'title' => __('Delete %1', $title),
9188
'message' => __('Are you sure you want to delete a %1 record?', $title)
92-
]
89+
],
90+
'post' => true
9391
];
9492
}
9593
if (isset($item['identifier'])) {
@@ -110,6 +108,7 @@ public function prepareDataSource(array $dataSource)
110108

111109
/**
112110
* Get instance of escaper
111+
*
113112
* @return Escaper
114113
* @deprecated 101.0.7
115114
*/

0 commit comments

Comments
 (0)