-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop
Accepted Community Pull Requests: - #31022: ISSUE-30265 - Fix product add / remove in Safari when creating an order in admin (by @zaximus84) - #30868: Fixed "Email Copy of Invoice", "Email Copy of Shipment" and "Email Copy of Creditmemo" Issues (by @gwharton) - #30822: Fix iterate on null (by @thomas-kl1) - #30910: Ensure that url suffix resolvers return strings to match function declaration (by @aligent-lturner) - #28926: Fix for communication.xml Handlers merging processs (by @matiashidalgo) - #31013: [MFTF] Adding AdminSetStockStatusActionGroup (by @AnnaAPak) - #31079: [MFTF] Refactoring of AdminMassUpdateProductAttributesMissingRequiredFieldTest (by @AnnaAPak) - #31151: Use magento coding standard 6 (by @ihor-sviziev) - #30477: Fix issue #30270 Product Reviews can not be sorted by Admin on the Product edit page (by @Chandresh22) - #30953: set correct remaining available discount amount when applying fixed p… (by @sky-hub) - #27845: Allow customer to specify associated product qtys when adding grouped product to cart via RESTful API (by @shawnabramson) - #30626: Handle exceptions thrown in child processes forked by ProcessManager (by @pawel-siejba) Fixed GitHub Issues: - #30265: SAFARI: endless deploy when admin try to add product in order (reported by @magento-engcom-team) has been fixed in #31022 by @zaximus84 in 2.4-develop branch Related commits: 1. d018988 - #28511: New Invoice: Checkbox "Email Copy of Invoice" is useless (reported by @TerrapinSoftware) has been fixed in #30868 by @gwharton in 2.4-develop branch Related commits: 1. e0d8149 - #30830: [Issue] Fix iterate on null (reported by @m2-assistant[bot]) has been fixed in #30822 by @thomas-kl1 in 2.4-develop branch Related commits: 1. f5d692f 2. 73edcb1 3. 8fcac9d 4. 5029cb0 5. e8294f8 - #30909: ProductUrlSuffix and CategoryUrlSuffix GraphQL resolvers fail with null values (reported by @aligent-lturner) has been fixed in #30910 by @aligent-lturner in 2.4-develop branch Related commits: 1. 5512626 2. ffcc523 3. 673edbe 4. 53ed515 - #29528: [Issue] Fix for communication.xml Handlers merging processs (reported by @m2-assistant[bot]) has been fixed in #28926 by @matiashidalgo in 2.4-develop branch Related commits: 1. fb9f52d 2. 2cbb726 3. 11ccb29 4. 623e87f 5. d5680d2 6. cf9de17 7. 8e054c7 8. e7cde72 9. 90e457d 10. 1bf790a 11. c373f3e 12. 0cfb88a 13. be308fa - #31034: [Issue] [MFTF] Adding AdminSetStockStatusActionGroup (reported by @m2-assistant[bot]) has been fixed in #31013 by @AnnaAPak in 2.4-develop branch Related commits: 1. 3adff7a 2. fe4a58f 3. b542bd8 4. 0b882f3 5. 8626a36 6. f95ed51 - #31160: [Issue] [MFTF] Refactoring of AdminMassUpdateProductAttributesMissingRequiredFieldTest (reported by @m2-assistant[bot]) has been fixed in #31079 by @AnnaAPak in 2.4-develop branch Related commits: 1. a3aa42c 2. 42a2d1f - #31152: Update Magento Coding Standard to version 6 (reported by @sivaschenko) has been fixed in #31151 by @ihor-sviziev in 2.4-develop branch Related commits: 1. 55926f8 - #30270: �Product Reviews� can not be sorted by Admin on the Product page (reported by @magento-engcom-team) has been fixed in #30477 by @Chandresh22 in 2.4-develop branch Related commits: 1. 4c5a130 2. 4e80ef9 3. c1eb748 4. 1c6672e 5. 9bd848a 6. f18ab23 7. da7bb72 8. 379027f 9. be1d79a 10. 3eb3553 11. 9985552 - #30952: [Cart Rule] Incorrect discount amount applied for bundle products containing more than one option (reported by @sky-hub) has been fixed in #30953 by @sky-hub in 2.4-develop branch Related commits: 1. d56db5b 2. 4d1e4ea 3. 12806e0 4. b4275c9 5. aa7e7cd 6. a24dc14 7. 963b28f 8. cfb8f02 9. 6015ada 10. eeda660 11. 47149bf 12. 15bc12c - #26909: Add grouped product with individual quantity to cart using rest api (reported by @manish-sirvi) has been fixed in #27845 by @shawnabramson in 2.4-develop branch Related commits: 1. dcc6381 2. de1f626 3. 8d2c280 4. e9fa0a8 5. d5160db 6. 8b141e1 7. bb9c1e2 8. 3bcdd48 9. 7f49335 10. 3626d9c 11. cc0c942 12. 74709d2 13. fa4c7b8 14. 24c27a4 15. be84eb1 16. c936161 17. 7af13d7 18. 4240a6b 19. 768b305 20. 4aa5527 21. 0ace0c3 22. bdfe7ec 23. 769653a - #30622: Process Manager doesn't handle exceptions properly in forked processes (reported by @pawel-siejba) has been fixed in #30626 by @pawel-siejba in 2.4-develop branch Related commits: 1. 5a5b6f7
- Loading branch information
Showing
47 changed files
with
1,896 additions
and
210 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...og/Test/Mftf/ActionGroup/AdminCheckNameToggleOnProductsMassAttributeUpdateActionGroup.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="AdminCheckNameToggleOnProductsMassAttributesUpdateActionGroup"> | ||
<annotations> | ||
<description>Click the "Change" checkbox for the "Name" field on the Products Masss Attributes Update page.</description> | ||
</annotations> | ||
|
||
<click selector="{{AdminEditProductAttributesSection.ChangeAttributeNameToggle}}" stepKey="toggleToChangeName"/> | ||
|
||
</actionGroup> | ||
</actionGroups> |
22 changes: 22 additions & 0 deletions
22
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCheckProductOnProductGridActionGroup.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,22 @@ | ||
<?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="AdminCheckProductOnProductGridActionGroup"> | ||
<annotations> | ||
<description>Check the checkbox for the product on the Product Grid</description> | ||
</annotations> | ||
<arguments> | ||
<argument name="product" type="entity"/> | ||
</arguments> | ||
|
||
<checkOption selector="{{AdminProductGridSection.productRowCheckboxBySku(product.sku)}}" stepKey="selectProduct"/> | ||
|
||
</actionGroup> | ||
</actionGroups> |
20 changes: 20 additions & 0 deletions
20
.../Catalog/Test/Mftf/ActionGroup/AdminClickSaveOnProductsMassAttributeUpdateActionGroup.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="AdminClickSaveOnProductsMassAttributesUpdateActionGroup"> | ||
<annotations> | ||
<description>Clicks on 'Save' button on products mass attributes update page.</description> | ||
</annotations> | ||
|
||
<click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="save"/> | ||
<waitForPageLoad stepKey="waitForUpdateAttributesPage"/> | ||
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="Update Attributes" stepKey="seeUpdateAttributesTitle"/> | ||
</actionGroup> | ||
</actionGroups> |
23 changes: 23 additions & 0 deletions
23
app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSetStockStatusActionGroup.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="AdminSetStockStatusActionGroup"> | ||
<annotations> | ||
<description>Set Stock Status of product.</description> | ||
</annotations> | ||
|
||
<arguments> | ||
<argument name="stockStatus" type="string" defaultValue="In Stock"/> | ||
</arguments> | ||
|
||
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{stockStatus}}" stepKey="setStockStatus"/> | ||
|
||
</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
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
173 changes: 173 additions & 0 deletions
173
app/code/Magento/CatalogUrlRewriteGraphQl/Test/Unit/Model/Resolver/CategoryUrlSuffixTest.php
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,173 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\CatalogUrlRewriteGraphQl\Test\Unit\Model\Resolver; | ||
|
||
use Magento\CatalogUrlRewriteGraphQl\Model\Resolver\CategoryUrlSuffix; | ||
use Magento\Framework\GraphQl\Config\Element\Field; | ||
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo; | ||
use Magento\GraphQl\Model\Query\ContextExtensionInterface; | ||
use Magento\GraphQl\Model\Query\ContextInterface; | ||
use Magento\Store\Api\Data\StoreInterface; | ||
use PHPUnit\Framework\MockObject\MockObject; | ||
use PHPUnit\Framework\TestCase; | ||
use Magento\Framework\App\Config\ScopeConfigInterface; | ||
|
||
/** | ||
* Test for \Magento\CatalogUrlRewriteGraphQl\Model\Resolver\CategoryUrlSuffix. | ||
*/ | ||
class CategoryUrlSuffixTest extends TestCase | ||
{ | ||
/** | ||
* @var ScopeConfigInterface|MockObject | ||
*/ | ||
private $scopeConfigMock; | ||
|
||
/** | ||
* @var ContextInterface|MockObject | ||
*/ | ||
private $contextMock; | ||
|
||
/** | ||
* @var ContextExtensionInterface|MockObject | ||
*/ | ||
private $contextExtensionMock; | ||
|
||
/** | ||
* @var StoreInterface|MockObject | ||
*/ | ||
private $storeMock; | ||
|
||
/** | ||
* @var Field|MockObject | ||
*/ | ||
private $fieldMock; | ||
|
||
/** | ||
* @var ResolveInfo|MockObject | ||
*/ | ||
private $resolveInfoMock; | ||
|
||
/** | ||
* @var CategoryUrlSuffix | ||
*/ | ||
private $resolver; | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
protected function setUp(): void | ||
{ | ||
$this->contextMock = $this->getMockBuilder(ContextInterface::class) | ||
->disableOriginalConstructor() | ||
->setMethods( | ||
[ | ||
'getExtensionAttributes' | ||
] | ||
) | ||
->getMockForAbstractClass(); | ||
|
||
$this->contextExtensionMock = $this->getMockBuilder(ContextExtensionInterface::class) | ||
->setMethods( | ||
[ | ||
'getStore' | ||
] | ||
) | ||
->getMockForAbstractClass(); | ||
|
||
$this->storeMock = $this->getMockBuilder(StoreInterface::class) | ||
->setMethods( | ||
[ | ||
'getId' | ||
] | ||
) | ||
->getMockForAbstractClass(); | ||
|
||
$this->fieldMock = $this->getMockBuilder(Field::class) | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$this->resolveInfoMock = $this->getMockBuilder(ResolveInfo::class) | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$this->scopeConfigMock = $this->getMockBuilder(ScopeConfigInterface::class) | ||
->getMockForAbstractClass(); | ||
|
||
$this->resolver = new CategoryUrlSuffix( | ||
$this->scopeConfigMock | ||
); | ||
} | ||
|
||
/** | ||
* Verify that empty string is returned when config value is null | ||
*/ | ||
public function testNullValue() | ||
{ | ||
$this->scopeConfigMock->expects($this->once()) | ||
->method('getValue') | ||
->willReturn(null); | ||
|
||
$this->contextMock | ||
->expects($this->once()) | ||
->method('getExtensionAttributes') | ||
->willReturn($this->contextExtensionMock); | ||
|
||
$this->contextExtensionMock | ||
->expects($this->once()) | ||
->method('getStore') | ||
->willReturn($this->storeMock); | ||
|
||
$this->storeMock | ||
->expects($this->once()) | ||
->method('getId') | ||
->willReturn(1); | ||
|
||
$this->assertEquals( | ||
'', | ||
$this->resolver->resolve( | ||
$this->fieldMock, | ||
$this->contextMock, | ||
$this->resolveInfoMock | ||
) | ||
); | ||
} | ||
|
||
/** | ||
* Verify that the configured value is returned | ||
*/ | ||
public function testNonNullValue() | ||
{ | ||
$value = 'html'; | ||
$this->scopeConfigMock->expects($this->once()) | ||
->method('getValue') | ||
->willReturn($value); | ||
|
||
$this->contextMock | ||
->expects($this->once()) | ||
->method('getExtensionAttributes') | ||
->willReturn($this->contextExtensionMock); | ||
|
||
$this->contextExtensionMock | ||
->expects($this->once()) | ||
->method('getStore') | ||
->willReturn($this->storeMock); | ||
|
||
$this->storeMock | ||
->expects($this->once()) | ||
->method('getId') | ||
->willReturn(1); | ||
|
||
$this->assertEquals( | ||
$value, | ||
$this->resolver->resolve( | ||
$this->fieldMock, | ||
$this->contextMock, | ||
$this->resolveInfoMock | ||
) | ||
); | ||
} | ||
} |
Oops, something went wrong.