Skip to content

Commit c1361ea

Browse files
committed
MAGETWO-58014: [GitHub] page cache also caches breadcrumbs #5502
1 parent 9d2a676 commit c1361ea

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductViewBreadcrumbsCategory.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magento\Catalog\Test\Fixture\Category;
1212
use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
1313
use Magento\Catalog\Test\Page\Product\CatalogProductView;
14+
use Magento\Cms\Test\Page\CmsIndex;
1415
use Magento\Mtf\Client\BrowserInterface;
1516
use Magento\Mtf\Constraint\AbstractConstraint;
1617

@@ -22,13 +23,15 @@ class AssertProductViewBreadcrumbsCategory extends AbstractConstraint
2223
/**
2324
* @param CatalogCategoryView $catalogCategoryView
2425
* @param CatalogProductView $catalogProductView
26+
* @param CmsIndex $cmsIndex
2527
* @param BrowserInterface $browser
2628
* @param CatalogProductSimple $product
2729
* @return void
2830
*/
2931
public function processAssert(
3032
CatalogCategoryView $catalogCategoryView,
3133
CatalogProductView $catalogProductView,
34+
CmsIndex $cmsIndex,
3235
BrowserInterface $browser,
3336
CatalogProductSimple $product
3437
) {
@@ -40,7 +43,8 @@ public function processAssert(
4043

4144
/** @var Category $category */
4245
foreach ($categories as $category) {
43-
$browser->open($_ENV['app_frontend_url'] . $category->getUrlKey() . '.html');
46+
$cmsIndex->open();
47+
$cmsIndex->getTopmenu()->selectCategoryByName($category->getName());
4448

4549
$productItem = $catalogCategoryView->getListProductBlock()->getProductItem($product);
4650
\PHPUnit_Framework_Assert::assertTrue(

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@
248248
<data name="product/data/weight" xsi:type="string">1</data>
249249
<data name="product/data/quantity_and_stock_status/qty" xsi:type="string">10</data>
250250
<data name="product/data/quantity_and_stock_status/is_in_stock" xsi:type="string">In Stock</data>
251+
<data name="product/data/category_ids/new_category" xsi:type="string">yes</data>
251252
<data name="product/data/category_ids/dataset" xsi:type="string">default_subcategory,default_subcategory</data>
252253
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
253254
<constraint name="Magento\Catalog\Test\Constraint\AssertProductViewBreadcrumbsCategory" />

0 commit comments

Comments
 (0)