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
+ <tests xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9
+ xsi : noNamespaceSchemaLocation =" urn:magento:mftf:Test/etc/testSchema.xsd" >
10
+ <test name =" CmsPageMassActionTest" >
11
+ <annotations >
12
+ <features value =" Cms" />
13
+ <title value =" Create two CMS Pages and perform mass disable action" />
14
+ <description value =" Admin should be able to perform mass actions to CMS pages" />
15
+ <group value =" backend" />
16
+ <group value =" cMSContent" />
17
+ <group value =" mtf_migrated" />
18
+ </annotations >
19
+ <before >
20
+ <actionGroup ref =" LoginAsAdmin" stepKey =" loginAsAdmin" />
21
+ <createData entity =" _defaultCmsPage" stepKey =" firstCMSPage" />
22
+ <createData entity =" _duplicatedCMSPage" stepKey =" secondCMSPage" />
23
+ </before >
24
+ <after >
25
+ <deleteData createDataKey =" firstCMSPage" stepKey =" deleteFirstCMSPage" />
26
+ <deleteData createDataKey =" secondCMSPage" stepKey =" deleteSecondCMSPage" />
27
+ <actionGroup ref =" logout" stepKey =" logout" />
28
+ </after >
29
+ <!-- Go to Grid page-->
30
+ <amOnPage url =" {{CmsPagesPage.url}}" stepKey =" navigateToCMSPagesGrid" />
31
+ <!-- Select pages in Grid-->
32
+ <checkOption selector =" {{CmsPagesPageActionsSection.pageRowCheckboxByIdentifier($$firstCMSPage.identifier$$)}}" stepKey =" selectFirstPage" />
33
+ <checkOption selector =" {{CmsPagesPageActionsSection.pageRowCheckboxByIdentifier($$secondCMSPage.identifier$$)}}" stepKey =" selectSecondPage" />
34
+ <!-- Disable Pages-->
35
+ <click selector =" {{CmsPagesPageActionsSection.massActionsButton}}" stepKey =" clickMassActionDropdown" />
36
+ <click selector =" {{CmsPagesPageActionsSection.massActionsOption('Disable')}}" stepKey =" clickDisableAction" />
37
+ <waitForPageLoad stepKey =" waitForPageToReload" />
38
+ <!-- Verify pages in Grid-->
39
+ <actionGroup ref =" AssertCMSPageInGrid" stepKey =" VerifyFirstPageinGrid" >
40
+ <argument name =" CMSPage" value =" $$firstCMSPage$$" />
41
+ </actionGroup >
42
+ <actionGroup ref =" AssertCMSPageInGrid" stepKey =" VerifySecondPageinGrid" >
43
+ <argument name =" CMSPage" value =" $$secondCMSPage$$" />
44
+ </actionGroup >
45
+ <!-- Verify Pages are disabled on Frontend-->
46
+ <amOnPage url =" {{StorefrontHomePage.url}}/{{$$firstCMSPage.identifier$$}}" stepKey =" amOnFirstPageOnFrontend" />
47
+ <waitForPageLoad stepKey =" waitForFirstPageLoadOnFrontend" />
48
+ <see userInput =" Whoops, our bad..." stepKey =" seePageErrorForFirstPage" />
49
+ <amOnPage url =" {{StorefrontHomePage.url}}/{{$$secondCMSPage.identifier$$}}" stepKey =" amOnSecondPageOnFrontend" />
50
+ <waitForPageLoad stepKey =" waitForSecondPageLoadOnFrontend" />
51
+ <see userInput =" Whoops, our bad..." stepKey =" seePageErrorForSecondPage" />
52
+ </test >
53
+ </tests >
0 commit comments