Skip to content

Commit f90bd88

Browse files
author
Mohan Ahuja
committed
Merge branch '2.4-develop' of https://github.com/magento-commerce/magento2ce into ACP2E-841
2 parents e343951 + 28c1f28 commit f90bd88

File tree

84 files changed

+1375
-448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1375
-448
lines changed

app/code/Magento/Analytics/Model/ExportDataHandler.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
use Magento\Framework\App\Filesystem\DirectoryList;
1010
use Magento\Framework\Archive;
11+
use Magento\Framework\Exception\FileSystemException;
1112
use Magento\Framework\Exception\LocalizedException;
1213
use Magento\Framework\Filesystem;
1314
use Magento\Framework\Filesystem\Directory\WriteInterface;
@@ -89,8 +90,7 @@ public function __construct(
8990
public function prepareExportData()
9091
{
9192
try {
92-
$tmpDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::SYS_TMP);
93-
93+
$tmpDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::TMP);
9494
$this->prepareDirectory($tmpDirectory, $this->getTmpFilesDirRelativePath());
9595
$this->reportWriter->write($tmpDirectory, $this->getTmpFilesDirRelativePath());
9696

@@ -106,8 +106,10 @@ public function prepareExportData()
106106
$this->cryptographer->encode($tmpDirectory->readFile($this->getArchiveRelativePath()))
107107
);
108108
} finally {
109-
$tmpDirectory->delete($this->getTmpFilesDirRelativePath());
110-
$tmpDirectory->delete($this->getArchiveRelativePath());
109+
if (isset($tmpDirectory)) {
110+
$tmpDirectory->delete($this->getTmpFilesDirRelativePath());
111+
$tmpDirectory->delete($this->getArchiveRelativePath());
112+
}
111113
}
112114

113115
return true;

app/code/Magento/Analytics/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Magento_Analytics module
22

3-
The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html) functionality.
3+
The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://business.adobe.com/products/magento/business-intelligence.html) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.4/advanced-reporting/modules.html) functionality.
44

55
The module implements the following functionality:
66

app/code/Magento/Analytics/Test/Unit/Model/ExportDataHandlerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Magento\Framework\Archive;
1616
use Magento\Framework\Filesystem;
1717
use Magento\Framework\Filesystem\Directory\WriteInterface;
18-
use Magento\Framework\Filesystem\DirectoryList;
18+
use Magento\Framework\App\Filesystem\DirectoryList;
1919
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
2020
use PHPUnit\Framework\MockObject\MockObject;
2121
use PHPUnit\Framework\TestCase;
@@ -127,7 +127,7 @@ public function testPrepareExportData($isArchiveSourceDirectory)
127127
$this->filesystemMock
128128
->expects($this->once())
129129
->method('getDirectoryWrite')
130-
->with(DirectoryList::SYS_TMP)
130+
->with(DirectoryList::TMP)
131131
->willReturn($this->directoryMock);
132132
$this->directoryMock
133133
->expects($this->exactly(4))
@@ -228,7 +228,7 @@ public function testPrepareExportDataWithLocalizedException()
228228
$this->filesystemMock
229229
->expects($this->once())
230230
->method('getDirectoryWrite')
231-
->with(DirectoryList::SYS_TMP)
231+
->with(DirectoryList::TMP)
232232
->willReturn($this->directoryMock);
233233
$this->reportWriterMock
234234
->expects($this->once())

app/code/Magento/AwsS3/Driver/AwsS3.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,10 @@ public function getRealPath($path)
527527
*/
528528
public function rename($oldPath, $newPath, DriverInterface $targetDriver = null): bool
529529
{
530+
if ($oldPath === $newPath) {
531+
return true;
532+
}
533+
530534
try {
531535
$this->adapter->move(
532536
$this->normalizeRelativePath($oldPath, true),

app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,4 +496,21 @@ public function testCreateDirectory(): void
496496

497497
self::assertTrue($this->driver->createDirectory(self::URL . 'test/test2/'));
498498
}
499+
500+
public function testRename(): void
501+
{
502+
$this->adapterMock->expects(self::once())
503+
->method('move')
504+
->with('test/path', 'test/path2');
505+
506+
self::assertTrue($this->driver->rename('test/path', 'test/path2'));
507+
}
508+
509+
public function testRenameSameDestination(): void
510+
{
511+
$this->adapterMock->expects(self::never())
512+
->method('move');
513+
514+
self::assertTrue($this->driver->rename('test/path', 'test/path'));
515+
}
499516
}

app/code/Magento/Backend/Test/Mftf/Section/AdminSystemAccountSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@
1111
<section name="AdminSystemAccountSection">
1212
<element name="interfaceLocale" type="select" selector="#interface_locale"/>
1313
<element name="currentPassword" type="text" selector="#current_password"/>
14+
<element name="username" type="text" selector="#username"/>
15+
<element name="newPassword" type="text" selector="#password"/>
16+
<element name="passwordConfirmation" type="text" selector="#confirmation"/>
1417
</section>
1518
</sections>

app/code/Magento/Backend/etc/menu.xsd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<xs:simpleType name="typeId">
8686
<xs:annotation>
8787
<xs:documentation>
88-
Item id attribute can has only [a-z0-9/_]. Minimal length 3 symbol. Case insensitive.
88+
Item id attribute can have only [a-z0-9/_]. Minimal length 3 characters. Case insensitive.
8989
</xs:documentation>
9090
</xs:annotation>
9191
<xs:restriction base="xs:string">
@@ -96,7 +96,7 @@
9696
<xs:simpleType name="typeAction">
9797
<xs:annotation>
9898
<xs:documentation>
99-
Item action attribute can has only [a-zA-Z0-9/_]. Minimal length 3 symbol
99+
Item action attribute can have only [a-zA-Z0-9/_]. Minimal length 3 characters.
100100
</xs:documentation>
101101
</xs:annotation>
102102
<xs:restriction base="xs:string">
@@ -107,7 +107,7 @@
107107
<xs:simpleType name="typeTitle">
108108
<xs:annotation>
109109
<xs:documentation>
110-
Item title attribute minimal length 3 symbol
110+
Item title attribute minimal length 3 characters.
111111
</xs:documentation>
112112
</xs:annotation>
113113
<xs:restriction base="xs:string">
@@ -119,7 +119,7 @@
119119
<xs:simpleType name="typeModule">
120120
<xs:annotation>
121121
<xs:documentation>
122-
Item module attribute can has only [a-z0-9_]. Minimal length 3 symbol. Case insensitive.
122+
Item module attribute can have only [a-z0-9_]. Minimal length 3 characters. Case insensitive.
123123
</xs:documentation>
124124
</xs:annotation>
125125
<xs:restriction base="xs:string">
@@ -130,7 +130,7 @@
130130
<xs:simpleType name="typeResource">
131131
<xs:annotation>
132132
<xs:documentation>
133-
Item resource attribute can has only [a-z0-9_]. Minimal length 3 symbol. Case insensitive.
133+
Item resource attribute can have only [a-z0-9_]. Minimal length 3 characters. Case insensitive.
134134
</xs:documentation>
135135
</xs:annotation>
136136
<xs:restriction base="xs:string">
@@ -141,7 +141,7 @@
141141
<xs:simpleType name="typeDependsConfig">
142142
<xs:annotation>
143143
<xs:documentation>
144-
Item resource attribute can has only [a-z0-9_]. Minimal length 3 symbol. Case insensitive.
144+
Item dependsOnConfig attribute can have only [a-z0-9_]. Minimal length 3 characters. Case insensitive.
145145
</xs:documentation>
146146
</xs:annotation>
147147
<xs:restriction base="xs:string">

app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@
4040

4141
<!-- Go to new product page and see a default attribute -->
4242
<!-- Switch from default attribute set to new attribute set -->
43-
<amOnPage url="{{AdminProductCreatePage.url('4', 'bundle')}}" stepKey="goToNewProductPage"/>
44-
<waitForPageLoad stepKey="wait2"/>
43+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToNewProductPage">
44+
<argument name="attributeSetId" value="4"/>
45+
<argument name="productType" value="bundle"/>
46+
</actionGroup>
47+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait2"/>
4548

4649
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
4750
<argument name="attributeSet" value="{{ProductAttributeFrontendLabel.label}}"/>

app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@
4040
</actionGroup>
4141

4242
<!--Go to product creation page-->
43-
<actionGroup ref="AdminOpenCreateBundleProductPageActionGroup" stepKey="goToBundleProductCreationPage"/>
43+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage">
44+
<argument name="attributeSetId" value="{{BundleProduct.set}}"/>
45+
<argument name="productType" value="{{BundleProduct.type}}"/>
46+
</actionGroup>
4447
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreationPage"/>
4548

4649
<!--Enable/Disable Toggle-->

app/code/Magento/Bundle/Test/Mftf/Test/AdminDeleteABundleProductTest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@
3131
</after>
3232

3333
<!--Create bundle product-->
34-
<actionGroup ref="AdminOpenCreateBundleProductPageActionGroup" stepKey="goToBundleProductCreationPage"/>
34+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="goToBundleProductCreationPage">
35+
<argument name="attributeSetId" value="{{BundleProduct.set}}"/>
36+
<argument name="productType" value="{{BundleProduct.type}}"/>
37+
</actionGroup>
38+
3539
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBundleProductCreationPage"/>
3640
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
3741
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>

0 commit comments

Comments
 (0)