Skip to content

Commit

Permalink
Merge branch '2.4.0-develop' into feature/259
Browse files Browse the repository at this point in the history
  • Loading branch information
lenaorobei authored May 8, 2020
2 parents 0b079a8 + 6b6f428 commit 6b89b29
Show file tree
Hide file tree
Showing 763 changed files with 19,280 additions and 3,739 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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="AdminFillSearchTermActionGroup">
<annotations>
<description>Fills the search terms form with sample data.</description>
</annotations>
<arguments>
<argument name="searchQuery" type="string"/>
<argument name="store" type="string"/>
<argument name="redirectUrl" type="string"/>
<argument name="suggestedTerms" type="string"/>
</arguments>
<!-- Fill form fields -->
<fillField selector="{{AdminSearchTermsPageFormFieldsSection.query_text}}" userInput="{{searchQuery}}" stepKey="fillFieldSearchQuery"/>
<selectOption selector="{{AdminSearchTermsPageFormFieldsSection.store_id}}" userInput="{{store}}" stepKey="selectStoreView"/>
<fillField selector="{{AdminSearchTermsPageFormFieldsSection.redirect}}" userInput="{{redirectUrl}}" stepKey="fillFieldRedirectUrl"/>
<selectOption selector="{{AdminSearchTermsPageFormFieldsSection.display_in_terms}}" userInput="{{suggestedTerms}}" stepKey="selectSuggestedTerms" />
</actionGroup>
</actionGroups>
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="AdminOpenNewSearchTermsPageActionGroup">
<annotations>
<description>Navigate to search terms form page.</description>
</annotations>
<amOnPage url="{{AdminSearchTermsFormPage.url}}" stepKey="amOnSearchTermsForm"/>
<waitForPageLoad stepKey="waitForPageLoad1"/>
</actionGroup>
</actionGroups>
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="AdminSaveSearchTermActionGroup">
<annotations>
<description>Save a new search term from Magento admin.</description>
</annotations>
<!-- Click save action and verify success message -->
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveSearchButton"/>
</actionGroup>
</actionGroups>
17 changes: 17 additions & 0 deletions app/code/Magento/AdvancedSearch/Test/Mftf/Data/SearchTermsData.xml
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.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
<entity name="SearchTerms">
<data key="searchQuery" unique="suffix">books</data>
<data key="store">Default Store View</data>
<data key="redirectUrl">http://sample.com</data>
<data key="suggestedTerms">1</data>
</entity>
</entities>
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.
*/
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="AdminSearchTermsFormPage" url="search/term/new/" area="admin" module="Magento_AdvancedSearch">
<section name="AdminSearchTermsPageFormFieldsSection"/>
</page>
</pages>
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.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminSearchTermsPageFormFieldsSection">
<element name="query_text" type="input" selector="#query_text"/>
<element name="store_id" type="select" selector="#store_id"/>
<element name="redirect" type="input" selector="#redirect"/>
<element name="display_in_terms" type="select" selector="#display_in_terms"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?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="AdminAddSearchTermTest">
<annotations>
<features value="AdvancedSearch"/>
<stories value="Add a new search term"/>
<title value="Admin should be able to create a new search term"/>
<description value="Admin should be able to create a new search term using search terms grid"/>
<severity value="CRITICAL"/>
<group value="AdvancedSearch"/>
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<actionGroup ref="AdminOpenNewSearchTermsPageActionGroup" stepKey="navigateToSearchTermPage"/>
<actionGroup ref="AdminFillSearchTermActionGroup" stepKey="fillNewSearchTermData">
<argument name="searchQuery" value="{{SearchTerms.searchQuery}}"/>
<argument name="store" value="{{SearchTerms.store}}"/>
<argument name="redirectUrl" value="{{SearchTerms.redirectUrl}}"/>
<argument name="suggestedTerms" value="{{SearchTerms.suggestedTerms}}"/>
</actionGroup>
<actionGroup ref="AdminSaveSearchTermActionGroup" stepKey="saveSearchTerm"/>
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSaveSearchTermSuccessMessage">
<argument name="message" value="You saved the search term."/>
<argument name="messageType" value="success"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
</annotations>

<waitForElementVisible selector="{{AdminHeaderSection.adminUserAccountText}}" stepKey="waitForAdminAccountTextVisible"/>
<seeElement selector="{{AdminHeaderSection.adminUserAccountText}}" stepKey="assertAdminAccountTextElement"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@
<data key="scope_code">base</data>
<data key="value">en_US</data>
</entity>
<entity name="GeneralLocalCodeConfigsForMexico">
<data key="path">general/locale/code</data>
<data key="scope">websites</data>
<data key="scope_code">base</data>
<data key="value">es_MX</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ public function getViewHeader(string $viewName): string
public function getDropViewSql(string $viewName): string
{
$quotedViewName = $this->getConnection()->quoteIdentifier($viewName);
return sprintf('DROP VIEW IF EXISTS %s;\n', $quotedViewName);
return sprintf("DROP VIEW IF EXISTS %s;\n", $quotedViewName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="deleteBackup">
<actionGroup name="AdminBackupDeleteActionGroup">
<annotations>
<description>Deletes a Backup using provided Backup Entity.</description>
</annotations>
Expand Down
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="AdminBackupIndexPageOpenActionGroup">
<amOnPage url="{{AdminBackupIndexPage.url}}" stepKey="navigateToBackupIndexPage"/>
<waitForPageLoad stepKey="waitForBackupIndexPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?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="deleteBackup" extends="AdminBackupDeleteActionGroup" deprecated="Use DeleteBackupActionGroup"/>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="BackupIndexPage" url="/backup/index/" area="admin" module="Magento_Backup">
<page name="AdminBackupIndexPage" url="/backup/index/" area="admin" module="Magento_Backup">
<section name="AdminMainActionsSection"/>
<section name="AdminGridTableSection"/>
<section name="AdminCreateBackupFormSection"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

<!--Go to backup index page-->
<amOnPage url="{{BackupIndexPage.url}}" stepKey="goToBackupPage"/>
<waitForPageLoad stepKey="waitForBackupPage"/>
<actionGroup ref="AdminBackupIndexPageOpenActionGroup" stepKey="navigateToBackupPage"/>

<!--Create system backup-->
<actionGroup ref="CreateSystemBackupActionGroup" stepKey="createSystemBackup"/>
Expand All @@ -39,17 +38,17 @@
<actionGroup ref="CreateDatabaseBackupActionGroup" stepKey="createDatabaseBackup"/>

<!--Delete system backup-->
<actionGroup ref="deleteBackup" stepKey="deleteSystemBackup">
<actionGroup ref="AdminBackupDeleteActionGroup" stepKey="deleteSystemBackup">
<argument name="backup" value="SystemBackup"/>
</actionGroup>

<!--Delete database/media backup-->
<actionGroup ref="deleteBackup" stepKey="deleteMediaBackup">
<actionGroup ref="AdminBackupDeleteActionGroup" stepKey="deleteMediaBackup">
<argument name="backup" value="MediaBackup"/>
</actionGroup>

<!--Delete database backup-->
<actionGroup ref="deleteBackup" stepKey="deleteDatabaseBackup">
<actionGroup ref="AdminBackupDeleteActionGroup" stepKey="deleteDatabaseBackup">
<argument name="backup" value="DatabaseBackup"/>
</actionGroup>

Expand Down

This file was deleted.

Loading

0 comments on commit 6b89b29

Please sign in to comment.