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#4192 from magento-pangolin/community-tests…
…-migration-pr [Pangolin] Community tests migration pr Resolves magento-commerce/magento-functional-tests-migration#386: Convert LockCustomerOnLoginPageTest to MFTF Resolves magento-commerce/magento-functional-tests-migration#578: Convert CreateExistingCustomerFrontendEntity to MFTF Resolves magento-commerce/magento-functional-tests-migration#276: Convert LoginAfterJSMinificationTest to MFTF Resolves magento-commerce/magento-functional-tests-migration#383: Convert LockAdminUserWhenCreatingNewRoleTest to MFTF Resolves magento-commerce/magento-functional-tests-migration#623: Convert CmsPageMassActionTest to MFTF
- Loading branch information
Showing
35 changed files
with
665 additions
and
5 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertAdminPageIsNot404ActionGroup.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,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertAdminPageIsNot404ActionGroup"> | ||
<dontSee userInput="404 Error" selector="{{AdminHeaderSection.pageHeading}}" stepKey="dontSee404PageHeading"/> | ||
</actionGroup> | ||
</actionGroups> |
20 changes: 20 additions & 0 deletions
20
app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertMessageInAdminPanelActionGroup.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,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertMessageInAdminPanelActionGroup"> | ||
<arguments> | ||
<argument name="message" type="string" /> | ||
<argument name="messageType" type="string" defaultValue="success" /> | ||
</arguments> | ||
|
||
<waitForElementVisible selector="{{AdminMessagesSection.messageByType(messageType)}}" stepKey="waitForMessageVisible" /> | ||
<see userInput="{{message}}" selector="{{AdminMessagesSection.messageByType(messageType)}}" stepKey="verifyMessage" /> | ||
</actionGroup> | ||
</actionGroups> |
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
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
32 changes: 32 additions & 0 deletions
32
app/code/Magento/Backend/Test/Mftf/Test/AdminLoginAfterJSMinificationTest.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,32 @@ | ||
<?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="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminLoginAfterJSMinificationTest"> | ||
<annotations> | ||
<features value="Backend"/> | ||
<title value="Admin panel should be accessible with JS minification enabled"/> | ||
<description value="Admin panel should be accessible with JS minification enabled"/> | ||
<testCaseId value="MC-14104" /> | ||
<group value="backend"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<magentoCLI command="config:set {{MinifyJavaScriptFilesEnableConfigData.path}} {{MinifyJavaScriptFilesEnableConfigData.value}}" stepKey="enableJsMinification"/> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
</before> | ||
<after> | ||
<magentoCLI command="config:set {{MinifyJavaScriptFilesDisableConfigData.path}} {{MinifyJavaScriptFilesDisableConfigData.value}}" stepKey="disableJsMinification"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="loggedInSuccessfully"/> | ||
<actionGroup ref="AssertAdminPageIsNot404ActionGroup" stepKey="dontSee404Page"/> | ||
</test> | ||
</tests> |
18 changes: 18 additions & 0 deletions
18
app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminCMSPageMassActionSelectActionGroup.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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminCMSPageMassActionSelectActionGroup"> | ||
<arguments> | ||
<argument name="action" type="string" /> | ||
</arguments> | ||
<click selector="{{CmsPagesPageActionsSection.massActionsButton}}" stepKey="clickMassActionDropdown"/> | ||
<click selector="{{CmsPagesPageActionsSection.massActionsOption(action)}}" stepKey="clickAction"/> | ||
<waitForPageLoad stepKey="waitForPageToReload"/> | ||
</actionGroup> | ||
</actionGroups> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminOpenCMSPagesGridActionGroup.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,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminOpenCMSPagesGridActionGroup"> | ||
<amOnPage url="{{CmsPagesPage.url}}" stepKey="navigateToCMSPagesGrid"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
16 changes: 16 additions & 0 deletions
16
app/code/Magento/Cms/Test/Mftf/ActionGroup/AdminSelectCMSPageInGridActionGroup.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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminSelectCMSPageInGridActionGroup"> | ||
<arguments> | ||
<argument name="identifier" type="string"/> | ||
</arguments> | ||
<checkOption selector="{{CmsPagesPageActionsSection.pageRowCheckboxByIdentifier(identifier)}}" stepKey="selectCmsPageInGrid"/> | ||
</actionGroup> | ||
</actionGroups> |
18 changes: 18 additions & 0 deletions
18
app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertCMSPageInGridActionGroup.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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertCMSPageInGridActionGroup"> | ||
<arguments> | ||
<argument name="cmsPage" type="entity" /> | ||
</arguments> | ||
|
||
<seeElement stepKey="seeElementByCmsPageIdentifier" selector="{{AdminDataGridTableSection.rowTemplateStrict(cmsPage.identifier)}}" /> | ||
<see userInput="{{cmsPage.title}}" stepKey="seeCmsPageTitle" selector="{{AdminDataGridTableSection.rowTemplateStrict(cmsPage.identifier)}}" /> | ||
</actionGroup> | ||
</actionGroups> |
13 changes: 13 additions & 0 deletions
13
app/code/Magento/Cms/Test/Mftf/ActionGroup/AssertCMSPageNotFoundOnStorefrontActionGroup.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,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertCMSPageNotFoundOnStorefrontActionGroup"> | ||
<see userInput="Whoops, our bad..." stepKey="seePageErrorNotFound"/> | ||
</actionGroup> | ||
</actionGroups> |
17 changes: 17 additions & 0 deletions
17
app/code/Magento/Cms/Test/Mftf/ActionGroup/StorefrontGoToCMSPageActionGroup.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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="StorefrontGoToCMSPageActionGroup"> | ||
<arguments> | ||
<argument name="identifier" type="string"/> | ||
</arguments> | ||
<amOnPage url="{{StorefrontHomePage.url}}{{identifier}}" stepKey="amOnCmsPageOnStorefront"/> | ||
<waitForPageLoad stepKey="waitForPageLoadOnStorefront"/> | ||
</actionGroup> | ||
</actionGroups> |
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
85 changes: 85 additions & 0 deletions
85
app/code/Magento/Cms/Test/Mftf/Test/AdminCmsPageMassActionTest.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,85 @@ | ||
<?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="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminCmsPageMassActionTest"> | ||
<annotations> | ||
<features value="CmsPage"/> | ||
<title value="Create two CMS Pages and perform mass disable action"/> | ||
<description value="Admin should be able to perform mass actions to CMS pages"/> | ||
<stories value="Admin Grid Mass Action" /> | ||
<testCaseId value="MC-14659" /> | ||
<severity value="CRITICAL"/> | ||
<group value="backend"/> | ||
<group value="CMSContent"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
<createData entity="_defaultCmsPage" stepKey="firstCMSPage" /> | ||
<createData entity="_duplicatedCMSPage" stepKey="secondCMSPage" /> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="firstCMSPage" stepKey="deleteFirstCMSPage" /> | ||
<deleteData createDataKey="secondCMSPage" stepKey="deleteSecondCMSPage" /> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!--Go to Grid page--> | ||
<actionGroup ref="AdminOpenCMSPagesGridActionGroup" stepKey="navigateToCMSPageGrid"/> | ||
<actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearPossibleGridFilters"/> | ||
|
||
<!--Select pages in Grid--> | ||
<actionGroup ref="AdminSelectCMSPageInGridActionGroup" stepKey="selectFirstCMSPage"> | ||
<argument name="identifier" value="$$firstCMSPage.identifier$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminSelectCMSPageInGridActionGroup" stepKey="selectSecondCMSPage"> | ||
<argument name="identifier" value="$$secondCMSPage.identifier$$"/> | ||
</actionGroup> | ||
|
||
<!-- Disable Pages--> | ||
<actionGroup ref="AdminCMSPageMassActionSelectActionGroup" stepKey="disablePages"> | ||
<argument name="action" value="Disable" /> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSuccessMessage"> | ||
<argument name="message" value="A total of 2 record(s) have been disabled." /> | ||
</actionGroup> | ||
|
||
<!--Verify pages in Grid--> | ||
<actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearGridFilters"/> | ||
<actionGroup ref="AdminGridFilterFillInputFieldActionGroup" stepKey="filterGridByFirstCmsPageIdentifier"> | ||
<argument name="filterInputName" value="identifier" /> | ||
<argument name="filterValue" value="$$firstCMSPage.identifier$$" /> | ||
</actionGroup> | ||
<actionGroup ref="AdminGridFilterApplyActionGroup" stepKey="applyFirstGridFilters"/> | ||
<actionGroup ref="AssertCMSPageInGridActionGroup" stepKey="assertFirstCmsPageInGrid"> | ||
<argument name="cmsPage" value="$$firstCMSPage$$" /> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AdminGridFilterFillInputFieldActionGroup" stepKey="filterGridBySecondCmsPageIdentifier"> | ||
<argument name="filterInputName" value="identifier" /> | ||
<argument name="filterValue" value="$$secondCMSPage.identifier$$" /> | ||
</actionGroup> | ||
<actionGroup ref="AdminGridFilterApplyActionGroup" stepKey="applySecondGridFilters"/> | ||
<actionGroup ref="AssertCMSPageInGridActionGroup" stepKey="assertSecondCmsPageInGrid"> | ||
<argument name="cmsPage" value="$$secondCMSPage$$" /> | ||
</actionGroup> | ||
<actionGroup ref="AdminGridFilterResetActionGroup" stepKey="clearGridFiltersToIsolateTest"/> | ||
|
||
<!--Verify pages are disabled on Storefront--> | ||
<actionGroup ref="StorefrontGoToCMSPageActionGroup" stepKey="goToFirstCMSPageOnStorefront"> | ||
<argument name="identifier" value="$$firstCMSPage.identifier$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AssertCMSPageNotFoundOnStorefrontActionGroup" stepKey="seeNotFoundErrorForFirstPage"/> | ||
<actionGroup ref="StorefrontGoToCMSPageActionGroup" stepKey="goToSecondCMSPageOnStorefront"> | ||
<argument name="identifier" value="$$secondCMSPage.identifier$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AssertCMSPageNotFoundOnStorefrontActionGroup" stepKey="seeNotFoundErrorForSecondPage"/> | ||
</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
...mer/Test/Mftf/ActionGroup/StorefrontFillCustomerLoginFormWithWrongPasswordActionGroup.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. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="StorefrontFillCustomerLoginFormWithWrongPasswordActionGroup" extends="StorefrontFillCustomerLoginFormActionGroup"> | ||
<remove keyForRemoval="fillPassword"/> | ||
<fillField userInput="{{customer.password}}_INCORRECT" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/> | ||
</actionGroup> | ||
</actionGroups> |
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
37 changes: 37 additions & 0 deletions
37
app/code/Magento/Customer/Test/Mftf/Test/StorefrontCreateExistingCustomerTest.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,37 @@ | ||
<?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="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="StorefrontCreateExistingCustomerTest"> | ||
<annotations> | ||
<features value="Customer"/> | ||
<title value="Attempt to register customer on storefront with existing email"/> | ||
<description value="Attempt to register customer on storefront with existing email"/> | ||
<testCaseId value="MC-10907" /> | ||
<group value="customers"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<createData entity="Simple_US_Customer" stepKey="customer"/> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="customer" stepKey="deleteCustomer"/> | ||
</after> | ||
|
||
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/> | ||
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm"> | ||
<argument name="customer" value="$$customer$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/> | ||
<actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="seeErrorMessage"> | ||
<argument name="messageType" value="error"/> | ||
<argument name="message" value="There is already an account with this email address."/> | ||
</actionGroup> | ||
</test> | ||
</tests> |
Oops, something went wrong.