diff options
author | Artur Signell <artur@vaadin.com> | 2012-12-11 14:59:32 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-12-11 14:59:32 +0000 |
commit | ff58af76ded8bd96e1dbefb1590df030532cade9 (patch) | |
tree | 9bec10974bfc3a0079e05693fb5614ca93b8da89 /uitest | |
parent | 7e4651c719d7b02f1473002ca8ea09f600c663de (diff) | |
parent | 2a6e9153c9589f4aac37593945ace8499eb32305 (diff) | |
download | vaadin-framework-ff58af76ded8bd96e1dbefb1590df030532cade9.tar.gz vaadin-framework-ff58af76ded8bd96e1dbefb1590df030532cade9.zip |
Merge "ComboBox should have getter and setter methods for pageLength #5381"
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.html | 176 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.java | 40 |
2 files changed, 216 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.html b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.html new file mode 100644 index 0000000000..3f0782742f --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.html @@ -0,0 +1,176 @@ +<?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>SelectPageLength</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">SelectPageLength</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/run/com.vaadin.tests.components.combobox.ComboBoxPageLength?restartApplication</td> + <td></td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::/VVerticalLayout[0]/VVerticalLayout[0]/VFilterSelect[0]#button</td> + <td>9,12</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item7</td> + <td>61,8</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::/VVerticalLayout[0]/VVerticalLayout[0]/VFilterSelect[0]#button</td> + <td>10,14</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item7</td> + <td>pagelength-8-page-1</td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[8]</td> + <td>pagelength-8-page-1</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td> + <td>68,7</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item0</td> + <td>pagelength-8-page-2</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item7</td> + <td>pagelength-8-page-2</td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[8]</td> + <td>pagelength-8-page-2</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td> + <td>68,7</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item0</td> + <td>pagelength-8-page-3</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item3</td> + <td>pagelength-8-page-3</td> +</tr> +<tr> + <td>waitForElementNotPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[4]</td> + <td></td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[4]</td> + <td>pagelength-8-page-3</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item3</td> + <td>38,6</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::/VVerticalLayout[0]/VVerticalLayout[0]/VFilterSelect[0]#button</td> + <td>7,9</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item0</td> + <td>pagelength-20-page-1</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item19</td> + <td>pagelength-20-page-1</td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[20]</td> + <td>pagelength-20-page-1</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td> + <td>126,7</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::/VVerticalLayout[0]/VVerticalLayout[0]/VMenuBar[0]#item0</td> + <td>40,5</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VOverlay[0]/VMenuBar[0]#item4</td> + <td>18,11</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VOverlay[1]/VMenuBar[0]#item0</td> + <td>51,10</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::/VVerticalLayout[0]/VVerticalLayout[0]/VFilterSelect[0]#button</td> + <td>11,13</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item0</td> + <td>pagelength-2-page-2</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td> + <td>pagelength-2-page-2</td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[2]</td> + <td>pagelength-2-page-2</td> +</tr> +<tr> + <td>mouseClick</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[0]/domChild[0]</td> + <td>78,4</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item0</td> + <td>pagelength-2-page-1</td> +</tr> +<tr> + <td>assertElementPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td> + <td>pagelength-2-page-1</td> +</tr> +<tr> + <td>assertElementNotPresent</td> + <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxPageLength::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[2]</td> + <td>pagelength-2-page-1</td> +</tr> +</tbody></table> +</body> +</html>
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.java b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.java new file mode 100644 index 0000000000..6807b21424 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/ComboBoxPageLength.java @@ -0,0 +1,40 @@ +package com.vaadin.tests.components.combobox; + +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; +import com.vaadin.ui.ComboBox; + +public class ComboBoxPageLength extends ComboBoxes2<ComboBox> { + + @Override + public void initializeComponents() { + super.initializeComponents(); + getComponent().addValueChangeListener(new ValueChangeListener() { + + @Override + public void valueChange(ValueChangeEvent event) { + if (event.getProperty() != null) { + if (event.getProperty().getValue() != null) { + Integer value = Integer.parseInt(((String) event + .getProperty().getValue()).split(" ")[1]); + getComponent().setPageLength(value); + } else { + getComponent().setPageLength(0); + } + } + } + }); + } + + @Override + protected Integer getTicketNumber() { + return 5381; + } + + @Override + protected String getDescription() { + return super.getDescription() + + ", changing ComboBox value will change the ComboBox pageLength to the # of the selected item, or to 0 in null selection."; + } + +} |