9 use Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit;
10 use Magento\Mtf\Constraint\AbstractConstraint;
22 const ERROR_MESSAGE_TITLE =
'The value specified in the URL Key field would generate a URL that already exists.';
33 CatalogProductEdit $productPage,
37 $actualMessage = $productPage->getMessagesBlock()->getErrorMessage();
38 \PHPUnit\Framework\Assert::assertContains(
39 self::ERROR_MESSAGE_TITLE,
41 'Wrong error message is displayed.' 42 .
"\nExpected: " . self::ERROR_MESSAGE_TITLE
43 .
"\nActual:\n" . $actualMessage
46 \PHPUnit\Framework\Assert::assertContains(
49 'Product url is not present on error message.' 50 .
"\nExpected: " . self::ERROR_MESSAGE_TITLE
51 .
"\nActual:\n" . $actualMessage
54 \PHPUnit\Framework\Assert::assertContains(
57 'Category url is not present on error message.' 58 .
"\nExpected: " . self::ERROR_MESSAGE_TITLE
59 .
"\nActual:\n" . $actualMessage
70 return 'Product url duplication error on save message is present.';
const ERROR_MESSAGE_TITLE
processAssert(CatalogProductEdit $productPage, CatalogProductSimple $product, Category $category)