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/testDashboardItemValueWidget.php')
-rw-r--r--ui/tests/selenium/dashboard/testDashboardItemValueWidget.php39
1 files changed, 15 insertions, 24 deletions
diff --git a/ui/tests/selenium/dashboard/testDashboardItemValueWidget.php b/ui/tests/selenium/dashboard/testDashboardItemValueWidget.php
index 38b0b55071a..3a987bf1516 100644
--- a/ui/tests/selenium/dashboard/testDashboardItemValueWidget.php
+++ b/ui/tests/selenium/dashboard/testDashboardItemValueWidget.php
@@ -241,9 +241,8 @@ class testDashboardItemValueWidget extends CWebTest {
'id:desc_h_pos',
'id:desc_v_pos',
'id:desc_size',
- 'id:desc_bold'
- // TODO: uncomment after DEV-2154 is ready.
-// 'id:desc_color'
+ 'id:desc_bold',
+ 'xpath://input[@id="desc_color"]/..'
];
$values = [
@@ -252,43 +251,34 @@ class testDashboardItemValueWidget extends CWebTest {
'id:value_h_pos',
'id:value_size',
'id:value_v_pos',
- 'id:value_bold'
- // TODO: uncomment after DEV-2154 is ready.
-// 'id:value_color'
+ 'id:value_bold',
+ 'xpath://input[@id="value_color"]/..'
];
$units = [
'id:units',
'id:units_pos',
'id:units_size',
- 'id:units_bold'
- // TODO: uncomment after DEV-2154 is ready.
-// 'id:units_color'
+ 'id:units_bold',
+ 'xpath://input[@id="units_color"]/..'
];
$time = [
'id:time_h_pos',
'id:time_v_pos',
'id:time_size',
- 'id:time_bold'
- // TODO: uncomment after DEV-2154 is ready.
-// 'id:time_color'
+ 'id:time_bold',
+ 'xpath://input[@id="time_color"]/..'
];
$indicator_colors = [
- // TODO: uncomment after DEV-2154 is ready.
-// 'id:up_color',
-// 'id:down_color',
-// 'id:updown_color',
- ];
-
- $background_color = [
- // TODO: uncomment after DEV-2154 is ready.
-// 'lbl_bg_color'
+ 'xpath://input[@id="up_color"]/..',
+ 'xpath://input[@id="down_color"]/..',
+ 'xpath://input[@id="updown_color"]/..'
];
// Merge all Advanced fields into one array.
- $fields = array_merge($description, $values, $units, $time, $indicator_colors, $background_color);
+ $fields = array_merge($description, $values, $units, $time, $indicator_colors, ['Background color']);
foreach ([false, true] as $advanced_config) {
$form->fill(['Advanced configuration' => $advanced_config]);
@@ -1360,8 +1350,9 @@ class testDashboardItemValueWidget extends CWebTest {
CDataHelper::addItemData(42244, $index, time() + $index);
$this->page->refresh()->waitUntilReady();
$rgb = implode(', ', sscanf($threshold['color'], "%02x%02x%02x"));
- $this->assertEquals('rgba('.$rgb.', 1)', $dashboard->getWidget($data['fields']['Name'])->getContent()
- ->query('class:dashboard-widget-item')->one()->getCSSValue('background-color')
+
+ $this->assertEquals('rgba('.$rgb.', 1)', $dashboard->getWidget($data['fields']['Name'])
+ ->query('xpath:.//div[contains(@class, "dashboard-widget-item")]/div')->one()->getCSSValue('background-color')
);
$index++;
}