Skip to content

Commit 4c79517

Browse files
committed
MTO-134: [Variation] Add Simple Product with required Custom Options to Cart
- Defects fixed
1 parent 74aa6b4 commit 4c79517

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

dev/tests/functional/tests/app/Magento/Backend/Test/Block/Messages.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ class Messages extends Block
2222
protected $successMessage = '[data-ui-id$=message-success]';
2323

2424
/**
25-
* "This is a required field." validation error message.
25+
* Selector for "This is a required field." validation error message.
2626
*
2727
* @var string
2828
*/
29-
protected $validationErrorMessage = '//div[@class="mage-error"][contains(text(), "This is required field")]';
29+
private $validationErrorMessage = '//div[@class="mage-error"][contains(text(), "This is required field")]';
3030

3131
/**
3232
* Last success message selector.

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,10 @@ protected function getListOptions()
195195
*/
196196
public function validationErrorMessageIsVisible($customOptionTitle)
197197
{
198-
return $this->_rootElement
199-
->find(
200-
sprintf(
201-
$this->customOptionField . $this->requiredOption . $this->validationErrorMessage, $customOptionTitle
202-
),
203-
Locator::SELECTOR_XPATH
204-
)->isVisible() ? true : false;
198+
$optionSelector = $this->customOptionField . $this->requiredOption . $this->validationErrorMessage;
199+
$title = sprintf($optionSelector, $customOptionTitle);
200+
201+
return $this->_rootElement->find($title, Locator::SELECTOR_XPATH)->isVisible();
205202
}
206203

207204
/**

0 commit comments

Comments
 (0)