Skip to content

Commit 181d24c

Browse files
committed
MC-39636: Create automated test for: "Try to save the category without filling the required fields."
1 parent 8d0a907 commit 181d24c

File tree

1 file changed

+5
-2
lines changed
  • dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Save

1 file changed

+5
-2
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Save/SaveCategoryTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ public function testTryToCreateCategoryWithEmptyValues(): void
103103
'return_session_messages_only' => false,
104104
]);
105105
$this->dispatch('backend/catalog/category/save');
106-
$message = 'The "Available Product Listing Sort By" attribute is required. Enter and try again.';
107-
$this->assertSessionMessages($this->equalTo([(string)__($message)]), MessageInterface::TYPE_ERROR);
106+
$message = (string)__(
107+
'The "%1" attribute is required. Enter and try again.',
108+
'Available Product Listing Sort By'
109+
);
110+
$this->assertSessionMessages($this->containsEqual($message), MessageInterface::TYPE_ERROR);
108111
}
109112
}

0 commit comments

Comments
 (0)