-
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 branch '2.4-develop' into fix-30094
- Loading branch information
Showing
54 changed files
with
1,634 additions
and
196 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...de/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontCheckPresentSubCategoryActionGroup.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="StorefrontCheckPresentSubCategoryActionGroup"> | ||
<annotations> | ||
<description>Checks for a subcategory in topmenu</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="parenCategoryName" type="string"/> | ||
<argument name="childCategoryName" type="string"/> | ||
</arguments> | ||
|
||
<waitForElementVisible selector="{{StorefrontHeaderSection.NavigationCategoryByName(parenCategoryName)}}" stepKey="waitForTopMenuLoaded"/> | ||
<moveMouseOver selector="{{StorefrontHeaderSection.NavigationCategoryByName(parenCategoryName)}}" stepKey="moveMouseToParentCategory"/> | ||
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(childCategoryName)}}" stepKey="seeSubcategoryInTree"/> | ||
</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
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Catalog/Test/Mftf/Section/AdminCategoryScheduleDesignUpdateSection.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. | ||
*/ | ||
--> | ||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminCategoryScheduleDesignUpdateSection"> | ||
<element name="sectionHeader" type="button" selector="div[data-index='schedule_design_update'] .fieldset-wrapper-title" timeout="30"/> | ||
<element name="sectionBody" type="text" selector="div[data-index='schedule_design_update'] .admin__fieldset-wrapper-content"/> | ||
</section> | ||
</sections> |
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
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
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
17 changes: 17 additions & 0 deletions
17
...Customer/Test/Mftf/ActionGroup/AssertStorefrontCustomerHasNoOtherAddressesActionGroup.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="AssertStorefrontCustomerHasNoOtherAddressesActionGroup"> | ||
<annotations> | ||
<description>Verifies customer has no additional address in address book</description> | ||
</annotations> | ||
<amOnPage url="{{StorefrontCustomerAddressesPage.url}}" stepKey="goToAddressPage"/> | ||
<waitForText userInput="You have no other address entries in your address book." selector=".block-addresses-list" stepKey="assertOtherAddresses"/> | ||
</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
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
20 changes: 20 additions & 0 deletions
20
app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminStartReorderFromOrderPageActionGroup.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="AdminStartReorderFromOrderPageActionGroup"> | ||
<annotations> | ||
<description>Reorder existing order. Requires admin order page to be opened.</description> | ||
</annotations> | ||
|
||
<click selector="{{AdminOrderDetailsMainActionsSection.reorder}}" stepKey="clickReorder"/> | ||
<waitForPageLoad stepKey="waitPageLoad"/> | ||
<waitForElementVisible selector="{{AdminHeaderSection.pageTitle}}" stepKey="waitForPageTitle"/> | ||
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeCreateNewOrderPageTitle"/> | ||
</actionGroup> | ||
</actionGroups> |
59 changes: 59 additions & 0 deletions
59
app/code/Magento/Sales/Test/Mftf/Test/AdminReorderAddressNotSavedInAddressBookTest.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,59 @@ | ||
<?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="AdminReorderAddressNotSavedInAddressBookTest"> | ||
<annotations> | ||
<features value="Sales"/> | ||
<stories value="Reorder"/> | ||
<title value="Same shipping address is not repeating multiple times in storefront checkout when Reordered"/> | ||
<description value="Same shipping address is not repeating multiple times in storefront checkout when Reordered"/> | ||
<testCaseId value="MC-38412"/> | ||
<useCaseId value="MC-38113"/> | ||
<severity value="MAJOR"/> | ||
<group value="sales"/> | ||
</annotations> | ||
<before> | ||
<createData entity="ApiCategory" stepKey="category"/> | ||
<createData entity="ApiSimpleProduct" stepKey="product"> | ||
<requiredEntity createDataKey="category"/> | ||
</createData> | ||
<createData entity="Simple_Customer_Without_Address" stepKey="customer"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> | ||
<argument name="Customer" value="$customer$"/> | ||
</actionGroup> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="product" stepKey="deleteProduct"/> | ||
<deleteData createDataKey="category" stepKey="deleteCategory"/> | ||
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> | ||
<deleteData createDataKey="customer" stepKey="deleteCustomer"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> | ||
</after> | ||
|
||
<!-- Create order for registered customer --> | ||
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToOrder"> | ||
<argument name="product" value="$product$"/> | ||
</actionGroup> | ||
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="openCheckoutPage"/> | ||
<actionGroup ref="LoggedInUserCheckoutFillingShippingSectionActionGroup" stepKey="fillAddressForm"/> | ||
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickPlaceOrder"/> | ||
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> | ||
|
||
<!-- Reorder created order --> | ||
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrderById"> | ||
<argument name="orderId" value="{$grabOrderNumber}"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminStartReorderFromOrderPageActionGroup" stepKey="startReorder"/> | ||
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/> | ||
|
||
<!-- Assert no additional addresses saved --> | ||
<actionGroup ref="AssertStorefrontCustomerHasNoOtherAddressesActionGroup" stepKey="assertAddresses"/> | ||
</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
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 |
---|---|---|
|
@@ -6,10 +6,6 @@ | |
namespace Magento\SendFriend\Model\ResourceModel; | ||
|
||
/** | ||
* SendFriend Log Resource Model | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
* | ||
* @api | ||
* @since 100.0.2 | ||
*/ | ||
|
@@ -32,6 +28,7 @@ protected function _construct() | |
* @param int $ip | ||
* @param int $startTime | ||
* @param int $websiteId | ||
* | ||
* @return int | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
|
@@ -46,7 +43,7 @@ public function getSendCount($object, $ip, $startTime, $websiteId = null) | |
AND time>=:time | ||
AND website_id=:website_id' | ||
); | ||
$bind = ['ip' => ip2long($ip), 'time' => $startTime, 'website_id' => (int)$websiteId]; | ||
$bind = ['ip' => $ip, 'time' => $startTime, 'website_id' => (int)$websiteId]; | ||
|
||
$row = $connection->fetchRow($select, $bind); | ||
return $row['count']; | ||
|
@@ -58,21 +55,24 @@ public function getSendCount($object, $ip, $startTime, $websiteId = null) | |
* @param int $ip | ||
* @param int $startTime | ||
* @param int $websiteId | ||
* | ||
* @return $this | ||
*/ | ||
public function addSendItem($ip, $startTime, $websiteId) | ||
{ | ||
$this->getConnection()->insert( | ||
$this->getMainTable(), | ||
['ip' => ip2long($ip), 'time' => $startTime, 'website_id' => $websiteId] | ||
['ip' => $ip, 'time' => $startTime, 'website_id' => $websiteId] | ||
); | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Delete Old logs | ||
* | ||
* @param int $time | ||
* | ||
* @return $this | ||
*/ | ||
public function deleteLogsBefore($time) | ||
|
Oops, something went wrong.