File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
dev/tests/functional/tests/app/Magento/Cms/Test/Block/Adminhtml/Page Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ class Grid extends DataGrid
66
66
*
67
67
* @var string
68
68
*/
69
- protected $ previewCmsPage = ".//a[contains(@class, 'action-menu-item') and text() = '%s'] " ;
69
+ protected $ previewCmsPage = ".. //a[contains(@class, 'action-menu-item') and text() = '%s'] " ;
70
70
71
71
/**
72
72
* Search item and open it on Frontend.
@@ -81,8 +81,10 @@ public function searchAndPreview(array $filter)
81
81
$ this ->search ($ filter );
82
82
$ rowItem = $ this ->_rootElement ->find ($ this ->rowItem );
83
83
if ($ rowItem ->isVisible ()) {
84
- $ rowItem ->find ('.action-select ' )->click ();
85
- $ rowItem ->find (sprintf ($ this ->previewCmsPage , $ itemName ), Locator::SELECTOR_XPATH )->click ();
84
+ $ selector = sprintf ('//tr[td="%s"]//*[@class="action-select"] ' , $ filter ['title ' ]);
85
+ $ selectedRow = $ this ->_rootElement ->find ($ selector , Locator::SELECTOR_XPATH );
86
+ $ selectedRow ->click ();
87
+ $ selectedRow ->find (sprintf ($ this ->previewCmsPage , $ itemName ), Locator::SELECTOR_XPATH )->click ();
86
88
} else {
87
89
throw new \Exception ('Searched item was not found. ' );
88
90
}
You can’t perform that action at this time.
0 commit comments