-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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 #5082 from magento-pangolin/MTF-MFTF-migration-kozan
[Community MTF to MFTF] Test conversion delivery
- Loading branch information
Showing
23 changed files
with
653 additions
and
3 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
app/code/Magento/Integration/Test/Mftf/ActionGroup/AdminCreatesNewIntegrationActionGroup.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,21 @@ | ||
<?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"> | ||
|
||
<!--Fill Required Fields --> | ||
<actionGroup name="AdminCreatesNewIntegrationActionGroup"> | ||
<arguments> | ||
<argument name="name" type="string"/> | ||
<argument name="password" type="string"/> | ||
</arguments> | ||
<fillField stepKey="fillNameField" selector="{{AdminNewIntegrationSection.name}}" userInput="{{name}}"/> | ||
<fillField stepKey="fillAdminPasswordField" selector="{{AdminNewIntegrationSection.password}}" userInput="{{password}}"/> | ||
</actionGroup> | ||
</actionGroups> |
17 changes: 17 additions & 0 deletions
17
...ode/Magento/Integration/Test/Mftf/ActionGroup/AdminDeleteIntegrationEntityActionGroup.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="AdminDeleteIntegrationEntityActionGroup"> | ||
<click stepKey="clickRemoveButon" selector="{{AdminIntegrationsGridSection.remove}}"/> | ||
<waitForElementVisible selector="{{AdminIntegrationsGridSection.submitButton}}" stepKey="waitForConfirmButtonVisible"/> | ||
<click stepKey="clickSubmitButton" selector="{{AdminIntegrationsGridSection.submitButton}}"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
18 changes: 18 additions & 0 deletions
18
...nto/Integration/Test/Mftf/ActionGroup/AdminNavigateToCreateIntegrationPageActionGroup.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"> | ||
|
||
<!--Click the "Add New Integration" Button --> | ||
|
||
<actionGroup name="AdminNavigateToCreateIntegrationPageActionGroup"> | ||
<click stepKey="clickAddNewIntegrationButton" selector="{{AdminIntegrationsGridSection.add}}"/> | ||
<waitForPageLoad stepKey="waitForNewNIntegrationPageLoaded"/> | ||
</actionGroup> | ||
</actionGroups> |
23 changes: 23 additions & 0 deletions
23
...ode/Magento/Integration/Test/Mftf/ActionGroup/AdminSearchIntegrationInGridActionGroup.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,23 @@ | ||
<?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="AdminSearchIntegrationInGridActionGroup"> | ||
<arguments> | ||
<argument name="name" type="string"/> | ||
</arguments> | ||
<!--Reset Search Filters --> | ||
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/> | ||
<!--Fill Integration Name Field --> | ||
<fillField selector="{{AdminIntegrationsGridSection.name}}" userInput="{{name}}" stepKey="filterByName"/> | ||
<!--Click "Search" Button --> | ||
<click selector="{{AdminIntegrationsGridSection.search}}" stepKey="doFilter"/> | ||
<waitForPageLoad stepKey="waitForSitemapPageLoadedAfterFiltering"/> | ||
</actionGroup> | ||
</actionGroups> |
17 changes: 17 additions & 0 deletions
17
...de/Magento/Integration/Test/Mftf/ActionGroup/AdminSubmitNewIntegrationFormActionGroup.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="AdminSubmitNewIntegrationFormActionGroup"> | ||
<!--Click the "Save" Button --> | ||
<click stepKey="clickSaveButton" selector="{{AdminNewIntegrationSection.saveButton}}"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
19 changes: 19 additions & 0 deletions
19
...ntegration/Test/Mftf/ActionGroup/AssertAdminMessageCreateIntegrationEntityActionGroup.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,19 @@ | ||
<?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="AssertAdminMessageCreateIntegrationEntityActionGroup"> | ||
<arguments> | ||
<argument name="message" type="string" defaultValue="The integration '{{name}}' has been saved."/> | ||
<argument name="messageType" type="string" defaultValue="success"/> | ||
</arguments> | ||
<waitForElementVisible selector="{{AdminIntegrationsGridSection.messageByType(messageType)}}" stepKey="waitForMessage"/> | ||
<see userInput="{{message}}" selector="{{AdminIntegrationsGridSection.messageByType(messageType)}}" stepKey="verifyMessage"/> | ||
</actionGroup> | ||
</actionGroups> |
17 changes: 17 additions & 0 deletions
17
...ento/Integration/Test/Mftf/ActionGroup/AssertDeletedIntegrationIsNotInGridActionGroup.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="AssertDeletedIntegrationIsNotInGridActionGroup"> | ||
<arguments> | ||
<argument name="name" type="string"/> | ||
</arguments> | ||
<dontSee userInput="{{name}}" selector="{{AdminIntegrationsGridSection.rowByIndex('1')}}" stepKey="donSeeIntegration"/> | ||
</actionGroup> | ||
</actionGroups> |
21 changes: 21 additions & 0 deletions
21
app/code/Magento/Integration/Test/Mftf/Section/AdminIntegrationsGridSection.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,21 @@ | ||
<?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="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
|
||
<section name="AdminIntegrationsGridSection"> | ||
<element name="add" type="button" selector=".page-actions .add"/> | ||
<element name="messageByType" type="block" selector="#messages .message-{{messageType}}" parameterized="true"/> | ||
<element name="name" type="input" selector=".data-grid-filters #integrationGrid_filter_name"/> | ||
<element name="search" type="input" selector=".admin__filter-actions button[title=Search]"/> | ||
<element name="remove" type="button" selector=".data-grid .delete"/> | ||
<element name="submitButton" type="button" selector=".action-primary.action-accept" timeout="30"/> | ||
<element name="rowByIndex" type="text" selector="tr[data-role='row']:nth-of-type({{var1}})" parameterized="true" timeout="30"/> | ||
<element name="edit" type="button" selector=".data-grid .edit"/> | ||
</section> | ||
</sections> |
18 changes: 18 additions & 0 deletions
18
app/code/Magento/Integration/Test/Mftf/Section/AdminNewIntegrationSection.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. | ||
*/ | ||
--> | ||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminNewIntegrationSection"> | ||
<element name="name" type="input" selector="#integration_properties_name"/> | ||
<element name="password" type="input" selector="#integration_properties_current_password"/> | ||
<element name="saveButton" type="button" selector=".page-actions #save-split-button-button"/> | ||
<element name="endpoint" type="input" selector="#integration_properties_endpoint"/> | ||
<element name="linkUrl" type="input" selector="#integration_properties_identity_link_url"/> | ||
<element name="save" type="button" selector=".page-actions-buttons .save"/> | ||
</section> | ||
</sections> |
63 changes: 63 additions & 0 deletions
63
app/code/Magento/Integration/Test/Mftf/Test/AdminDeleteIntegrationEntityTest.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,63 @@ | ||
<?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="AdminDeleteIntegrationEntityTest"> | ||
<annotations> | ||
<features value="Integration"/> | ||
<stories value="System Integration"/> | ||
<title value="Admin system integration"/> | ||
<description value="Admin Deletes Created Integration"/> | ||
<group value="integration"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<!-- Login As Admin --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> | ||
<!-- Navigate To Integrations Page --> | ||
<actionGroup ref="AdminNavigateMenuActionGroup" stepKey="navigateToIntegrationsPage"> | ||
<argument name="menuUiId" value="{{AdminMenuSystem.dataUiId}}"/> | ||
<argument name="submenuUiId" value="{{AdminMenuSystemExtensionsIntegrations.dataUiId}}"/> | ||
</actionGroup> | ||
<!-- Click the "Add New Integration" button --> | ||
<actionGroup ref="AdminNavigateToCreateIntegrationPageActionGroup" stepKey="clickAddNewIntegrationButton"/> | ||
<!-- Create New Integration --> | ||
<actionGroup ref="AdminCreatesNewIntegrationActionGroup" stepKey="createIntegration"> | ||
<argument name="name" value="Integration1"/> | ||
<argument name="password" value="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/> | ||
</actionGroup> | ||
<!-- Submit The Form --> | ||
<actionGroup ref="AdminSubmitNewIntegrationFormActionGroup" stepKey="submitTheForm"/> | ||
</before> | ||
<after> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!-- TEST BODY --> | ||
<!-- Find Created Integration In Grid --> | ||
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findCreatedIntegration"> | ||
<argument name="name" value="Integration1"/> | ||
</actionGroup> | ||
<!-- Delete Created Integration Entity --> | ||
<actionGroup ref="AdminDeleteIntegrationEntityActionGroup" stepKey="deleteIntegration"/> | ||
<!-- Assert Success Message --> | ||
<actionGroup ref="AssertAdminMessageCreateIntegrationEntityActionGroup" stepKey="seeSuccessMessage"> | ||
<argument name="message" value="The integration 'Integration1' has been deleted."/> | ||
<argument value="success" name="messageType"/> | ||
</actionGroup> | ||
<!-- Assert Deleted Integration Is Not In Grid --> | ||
<actionGroup ref="AdminSearchIntegrationInGridActionGroup" stepKey="findDeletedIntegration"> | ||
<argument name="name" value="Integration1"/> | ||
</actionGroup> | ||
<actionGroup ref="AssertDeletedIntegrationIsNotInGridActionGroup" stepKey="dontSeeIntegration"> | ||
<argument name="name" value="Integration1"/> | ||
</actionGroup> | ||
<!-- END TEST BODY --> | ||
</test> | ||
</tests> |
89 changes: 89 additions & 0 deletions
89
...e/Magento/UrlRewrite/Test/Mftf/Test/AdminUpdateCmsPageRewriteEntityWithNoRedirectTest.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,89 @@ | ||
<?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="AdminUpdateCmsPageRewriteEntityWithNoRedirectTest"> | ||
<annotations> | ||
<stories value="Update CMS Page URL Redirect With No Redirect"/> | ||
<title value="Update CMS Page URL Redirect With No Redirect"/> | ||
<description value="Login as Admin and tried to update the created URL Rewrite for CMS page"/> | ||
<group value="cMSContent"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
|
||
<before> | ||
<createData entity="simpleCmsPage" stepKey="createCMSPage"/> | ||
<actionGroup ref="LoginAsAdmin" stepKey="login"/> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="createCMSPage" stepKey="deleteCMSPage"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!--Create Custom Store View--> | ||
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createCustomStoreView"/> | ||
|
||
<!-- Open CMS Edit Page, Get the CMS ID and Modify Store View Option to All Store Views --> | ||
<actionGroup ref="navigateToCreatedCMSPage" stepKey="navigateToCreatedCMSPage"> | ||
<argument name="CMSPage" value="$$createCMSPage$$"/> | ||
</actionGroup> | ||
<grabFromCurrentUrl stepKey="cmsId" regex="#\/([0-9]*)?\/$#"/> | ||
<actionGroup ref="AddStoreViewToCmsPage" stepKey="updateStoreViewForCmsPage"> | ||
<argument name="CMSPage" value="$$createCMSPage$$"/> | ||
<argument name="storeViewName" value="All Store Views"/> | ||
</actionGroup> | ||
|
||
<!--Create CMS Page URL Redirect--> | ||
<actionGroup ref="AdminAddCustomUrlRewrite" stepKey="addCustomUrlRewrite"> | ||
<argument name="customUrlRewriteValue" value="Custom"/> | ||
<argument name="storeValue" value="Default Store View"/> | ||
<argument name="requestPath" value="created-new-cms-page"/> | ||
<argument name="redirectTypeValue" value="Permanent (301)"/> | ||
<argument name="targetPath" value="cms/page/view/page_id/{$cmsId}"/> | ||
<argument name="description" value="Created New CMS Page"/> | ||
</actionGroup> | ||
|
||
<!--Search created CMS page url rewrite in grid--> | ||
<actionGroup ref="AdminSearchAndSelectUrlRewriteInGrid" stepKey="searchUrlRewrite"> | ||
<argument name="requestPath" value="created-new-cms-page"/> | ||
</actionGroup> | ||
|
||
<!-- Update URL Rewrite for CMS Page --> | ||
<actionGroup ref="AdminUpdateUrlRewrite" stepKey="updateUrlRewriteFirstAttempt"> | ||
<argument name="storeValue" value="{{customStore.name}}"/> | ||
<argument name="requestPath" value="newrequestpath"/> | ||
<argument name="redirectTypeValue" value="No"/> | ||
<argument name="description" value="test_description_custom_store"/> | ||
</actionGroup> | ||
|
||
<!-- Assert Url Rewrite Save Message --> | ||
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSuccessMessage"> | ||
<argument name="message" value="The URL Rewrite has been saved."/> | ||
</actionGroup> | ||
|
||
<!-- Assert Url Rewrite Cms Page Redirect --> | ||
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomepage"/> | ||
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="storefrontSwitchToCustomStoreView"> | ||
<argument name="storeView" value="customStore"/> | ||
</actionGroup> | ||
<actionGroup ref="navigateToStorefrontForCreatedPage" stepKey="navigateToTheStoreFront"> | ||
<argument name="page" value="newrequestpath"/> | ||
</actionGroup> | ||
<actionGroup ref="AssertStoreFrontCMSPage" stepKey="assertCMSPage"> | ||
<argument name="cmsTitle" value="$$createCMSPage.title$$"/> | ||
<argument name="cmsContent" value="$$createCMSPage.content$$"/> | ||
<argument name="cmsContentHeading" value="$$createCMSPage.content_heading$$"/> | ||
</actionGroup> | ||
|
||
<actionGroup ref="AdminDeleteUrlRewrite" stepKey="deleteCustomUrlRewrite"> | ||
<argument name="requestPath" value="newrequestpath"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteCustomStoreView"/> | ||
|
||
</test> | ||
</tests> |
Oops, something went wrong.