File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
dev/tests/functional/tests/app/Magento
Catalog/Test/Block/Product/View Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,11 @@ class Messages extends Block
22
22
protected $ successMessage = '[data-ui-id$=message-success] ' ;
23
23
24
24
/**
25
- * "This is a required field." validation error message.
25
+ * Selector for "This is a required field." validation error message.
26
26
*
27
27
* @var string
28
28
*/
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")] ' ;
30
30
31
31
/**
32
32
* Last success message selector.
Original file line number Diff line number Diff line change @@ -195,13 +195,10 @@ protected function getListOptions()
195
195
*/
196
196
public function validationErrorMessageIsVisible ($ customOptionTitle )
197
197
{
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 ();
205
202
}
206
203
207
204
/**
You can’t perform that action at this time.
0 commit comments