9 use Magento\Catalog\Test\Page\Adminhtml\CatalogCategoryEdit;
10 use Magento\Mtf\Constraint\AbstractConstraint;
21 const ERROR_MESSAGE_TITLE =
'The value specified in the URL Key field would generate a URL that already exists.';
31 CatalogCategoryEdit $productPage,
34 $actualMessage = $productPage->getMessagesBlock()->getErrorMessage();
35 \PHPUnit\Framework\Assert::assertContains(
36 self::ERROR_MESSAGE_TITLE,
38 'Wrong error message is displayed.' 39 .
"\nExpected: " . self::ERROR_MESSAGE_TITLE
40 .
"\nActual:\n" . $actualMessage
43 \PHPUnit\Framework\Assert::assertContains(
46 'Category url is not present on error message.' 47 .
"\nExpected: " . self::ERROR_MESSAGE_TITLE
48 .
"\nActual:\n" . $actualMessage
59 return 'Category url duplication error on save message is present.';
processAssert(CatalogCategoryEdit $productPage, Category $category)
const ERROR_MESSAGE_TITLE