aboutsummaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Pòˆntelin <teemu@vaadin.com>2013-06-28 15:13:45 +0300
committerVaadin Code Review <review@vaadin.com>2013-06-28 13:04:31 +0000
commit08d365a41885c62597b9f0d29d6ef59b45b36577 (patch)
tree940d6edb22a55cedea5592718c791301fe955fda /uitest
parenta4f127722af09a0e67f8df7c9aa3916b52d4595a (diff)
downloadvaadin-framework-08d365a41885c62597b9f0d29d6ef59b45b36577.tar.gz
vaadin-framework-08d365a41885c62597b9f0d29d6ef59b45b36577.zip
Fixed slider value initialization on HSV and RGB tabs of ColorPicker. (#7863)
Change-Id: I3776400d849d4ba9f76d6296603152c0a6464aaa
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html37
-rw-r--r--uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.java41
2 files changed, 78 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html b/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html
new file mode 100644
index 0000000000..1c53673b41
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.html
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>ColorPickerTest</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">ColorPickerTest</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.colorpicker.ColorPickerHsvTest?restartApplication</td>
+ <td></td>
+</tr>
+<!-- verify HSV sliders when initially opening the tab, ticket #7863 -->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscolorpickerColorPickerHsvTest::PID_Scolorpicker/domChild[1]</td>
+ <td>20,16</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscolorpickerColorPickerHsvTest::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/Slot[0]/VTabsheet[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>16,5</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>hsv-initial-sliders</td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.java b/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.java
new file mode 100644
index 0000000000..ab77fbf2ba
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/colorpicker/ColorPickerHsvTest.java
@@ -0,0 +1,41 @@
+package com.vaadin.tests.components.colorpicker;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.shared.ui.colorpicker.Color;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.ColorPickerArea;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalLayout;
+
+/**
+ * Tests the HSV tab slider values when initially opening the tab.
+ */
+public class ColorPickerHsvTest extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ VerticalLayout layout = new VerticalLayout();
+ layout.setMargin(true);
+ setContent(layout);
+
+ layout.addComponent(new Label(
+ "HSV initial values when opening the tab for the first time"));
+ ColorPickerArea colorpicker = new ColorPickerArea();
+ colorpicker.setColor(new Color(Integer.parseInt("00b4f0", 16)));
+ colorpicker.setDefaultCaptionEnabled(false);
+ colorpicker.setId("colorpicker");
+ layout.addComponent(colorpicker);
+
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Tests the slider values when initially opening the HSV tab.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 7863;
+ }
+
+}