Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ui/tests/selenium/dashboard/testDashboardPages.php')
-rw-r--r--ui/tests/selenium/dashboard/testDashboardPages.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/ui/tests/selenium/dashboard/testDashboardPages.php b/ui/tests/selenium/dashboard/testDashboardPages.php
index ef201713a33..4ccbca0c1cb 100644
--- a/ui/tests/selenium/dashboard/testDashboardPages.php
+++ b/ui/tests/selenium/dashboard/testDashboardPages.php
@@ -18,6 +18,7 @@
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
+
require_once dirname(__FILE__).'/../../include/CWebTest.php';
require_once dirname(__FILE__).'/../../include/helpers/CDataHelper.php';
require_once dirname(__FILE__).'/../behaviors/CMessageBehavior.php';
@@ -455,6 +456,7 @@ class testDashboardPages extends CWebTest {
$dashboard->addPage();
$page_dialog = COverlayDialogElement::find()->waitUntilReady()->one();
$page_dialog->query('name:dashboard_page_properties_form')->asForm()->one()->fill($data['fields'])->submit();
+ $page_dialog->ensureNotPresent();
$dashboard->waitUntilReady();
$title = $data['fields']['Name'];
@@ -686,7 +688,7 @@ class testDashboardPages extends CWebTest {
$value = $this->query('xpath:('.$selector.']/../../div)['.$index.']')->waitUntilVisible()->one()->getAttribute('class');
if ($value !== 'selected-tab') {
- $this->selectPage($page_name, $index);
+ CDashboardElement::find()->one()->selectPage($page_name, $index);
}
$this->query('xpath:('.$selector.']/following-sibling::button)['.$index.']')->waitUntilClickable()->one()->click();
@@ -694,20 +696,6 @@ class testDashboardPages extends CWebTest {
}
/**
- * Select page by name.
- *
- * @param string $page_name page name where to open menu
- * @param integer $index number of page that has duplicated name
- */
- private function selectPage($page_name, $index = 1) {
- $selection = '//ul[@class="sortable-list"]//span[@title='.CXPathHelper::escapeQuotes($page_name);
- $this->query('xpath:('.$selection.'])['.$index.']')
- ->one()->click()->waitUntilReady();
- $this->query('xpath:'.$selection.']/../../div[@class="selected-tab"]')
- ->one()->waitUntilPresent();
- }
-
- /**
* Select action from pages popup menu.
*
* @param string $page_name page name where to open menu