Pursuit Lumaflex™ Tone Band
x™
diff --git a/app/code/Magento/Catalog/Test/Mftf/Helper/LocalFileAssertions.php b/app/code/Magento/Catalog/Test/Mftf/Helper/LocalFileAssertions.php
index ed0e244c280dc..dbf777c1fe5c5 100644
--- a/app/code/Magento/Catalog/Test/Mftf/Helper/LocalFileAssertions.php
+++ b/app/code/Magento/Catalog/Test/Mftf/Helper/LocalFileAssertions.php
@@ -134,6 +134,22 @@ public function assertFileExists($filePath, $message = ''): void
$this->assertTrue($this->driver->isExists($realPath), $message);
}
+ /**
+ * Asserts that a file with the given glob pattern exists in the given path
+ *
+ * @param string $path
+ * @param string $pattern
+ * @param string $message
+ *
+ * @throws \Magento\Framework\Exception\FileSystemException
+ */
+ public function assertGlobbedFileExists($path, $pattern, $message = ""): void
+ {
+ $realPath = $this->expandPath($path);
+ $files = $this->driver->search($pattern, $realPath);
+ $this->assertNotEmpty($files, $message);
+ }
+
/**
* Assert a file does not exist
*
@@ -195,6 +211,25 @@ public function assertFileContainsString($filePath, $text, $message = ""): void
$this->assertStringContainsString($text, $this->driver->fileGetContents($realPath), $message);
}
+ /**
+ * Asserts that a file with the given glob pattern at the given path contains a given string
+ *
+ * @param string $path
+ * @param string $pattern
+ * @param string $text
+ * @param int $fileIndex
+ * @param string $message
+ * @return void
+ *
+ * @throws \Magento\Framework\Exception\FileSystemException
+ */
+ public function assertGlobbedFileContainsString($path, $pattern, $text, $fileIndex = 0, $message = ""): void
+ {
+ $realPath = $this->expandPath($path);
+ $files = $this->driver->search($pattern, $realPath);
+ $this->assertStringContainsString($text, $this->driver->fileGetContents($files[$fileIndex] ?? ''), $message);
+ }
+
/**
* Assert a file does not contain a given string
*
diff --git a/app/code/Magento/Catalog/Test/Mftf/Test/AdminShowDoubleSpacesInProductGrid.xml b/app/code/Magento/Catalog/Test/Mftf/Test/AdminShowDoubleSpacesInProductGrid.xml
new file mode 100644
index 0000000000000..c3e939b4155c8
--- /dev/null
+++ b/app/code/Magento/Catalog/Test/Mftf/Test/AdminShowDoubleSpacesInProductGrid.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Ui/ProductViewCounterTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Ui/ProductViewCounterTest.php
index 6026d1462e461..87f5be4b21333 100644
--- a/app/code/Magento/Catalog/Test/Unit/Block/Ui/ProductViewCounterTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Block/Ui/ProductViewCounterTest.php
@@ -166,6 +166,7 @@ public function testGetCurrentProductDataWithNonEmptyProduct()
{
$productMock = $this->getMockBuilder(ProductInterface::class)
->disableOriginalConstructor()
+ ->addMethods(['isAvailable'])
->getMockForAbstractClass();
$productRendererMock = $this->getMockBuilder(ProductRenderInterface::class)
->disableOriginalConstructor()
@@ -173,7 +174,6 @@ public function testGetCurrentProductDataWithNonEmptyProduct()
$storeMock = $this->getMockBuilder(Store::class)
->disableOriginalConstructor()
->getMock();
-
$this->registryMock->expects($this->once())
->method('registry')
->with('product')
diff --git a/app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml b/app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml
index 88bb578712056..2cd2a15b04900 100644
--- a/app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml
+++ b/app/code/Magento/Catalog/view/adminhtml/ui_component/product_listing.xml
@@ -132,7 +132,7 @@
true
text
- ui/grid/cells/html
+ Magento_Catalog/grid/cells/preserved
@@ -155,7 +155,7 @@
text
- ui/grid/cells/html
+ Magento_Catalog/grid/cells/preserved
diff --git a/app/code/Magento/Catalog/view/adminhtml/web/template/grid/cells/preserved.html b/app/code/Magento/Catalog/view/adminhtml/web/template/grid/cells/preserved.html
new file mode 100644
index 0000000000000..936342df23795
--- /dev/null
+++ b/app/code/Magento/Catalog/view/adminhtml/web/template/grid/cells/preserved.html
@@ -0,0 +1,7 @@
+
+
diff --git a/app/code/Magento/Catalog/view/base/web/js/product/addtocart-button.js b/app/code/Magento/Catalog/view/base/web/js/product/addtocart-button.js
index 4baf082b37c02..f599d05ba5ea9 100644
--- a/app/code/Magento/Catalog/view/base/web/js/product/addtocart-button.js
+++ b/app/code/Magento/Catalog/view/base/web/js/product/addtocart-button.js
@@ -55,6 +55,16 @@ define([
return row['is_salable'];
},
+ /**
+ * Depends on this option, stock status text can be "In stock" or "Out Of Stock"
+ *
+ * @param {Object} row
+ * @returns {Boolean}
+ */
+ isAvailable: function (row) {
+ return row['is_available'];
+ },
+
/**
* Depends on this option, "Add to cart" button can be shown or hide. Depends on backend configuration
*
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml
index 07cca77178a38..b7d6e1f2079a0 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml
@@ -78,7 +78,7 @@
- getIsSalable()) :?>
+ isAvailable()) :?>
= $block->escapeHtml(__('In stock')) ?>
= $block->escapeHtml(__('Out of stock')) ?>
diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
index a831bd7be6f71..4fba22f41c9de 100644
--- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml
@@ -153,7 +153,7 @@ $_helper = $block->getData('outputHelper');
- = $block->getToolbarHtml() ?>
+ = $block->getChildBlock('toolbar')->setIsBottom(true)->toHtml() ?>