Skip to content

Commit 0219ace

Browse files
committed
MAGETWO-63209: Fatal error on category page when changing display mode with flat category on
1 parent 1b25f08 commit 0219ace

File tree

1 file changed

+1
-14
lines changed
  • dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit

1 file changed

+1
-14
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Category/Edit/CategoryForm.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ class CategoryForm extends FormTabs
3737
*/
3838
protected $confirmModal = '.confirm._show[data-role=modal]';
3939

40-
/**
41-
* Category edit title.
42-
*
43-
* @var string
44-
*/
45-
protected $categoryTitle = '.category-edit-title h3.title';
46-
4740
/**
4841
* Fill form with tabs.
4942
*
@@ -74,14 +67,8 @@ public function fill(FixtureInterface $fixture, SimpleElement $element = null)
7467
*/
7568
public function getCategoryId()
7669
{
77-
$titleElement = $this->_rootElement->find($this->categoryTitle);
78-
$title = '';
79-
if ($titleElement->isVisible()) {
80-
$title = $titleElement->getText();
81-
}
82-
8370
$categoryId = '';
84-
if (preg_match('/ID:\s*(?<id>\d+)/', $title, $matches)) {
71+
if (preg_match('/\/id\/(?<id>\d+)(?:\/)?/', $this->browser->getUrl(), $matches)) {
8572
$categoryId = $matches['id'];
8673
}
8774

0 commit comments

Comments
 (0)