diff options
-rw-r--r-- | tests/src/com/vaadin/tests/components/textfield/TextFieldTextChangeEvent.htm | 359 |
1 files changed, 359 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/components/textfield/TextFieldTextChangeEvent.htm b/tests/src/com/vaadin/tests/components/textfield/TextFieldTextChangeEvent.htm new file mode 100644 index 0000000000..e6ccc0f254 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/textfield/TextFieldTextChangeEvent.htm @@ -0,0 +1,359 @@ +<?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>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<!-- Only works properly in Firefox and therefore named .htm instead of .html. Other browsers do not enter text with keydown,keypress,keyup combo. Cannot use pressSpecialKey either for some reason (not even in Firefox) -->
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.textfield.TextFieldTest?restartApplication</td>
+ <td></td>
+</tr>
+<!--Enable text change listener-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_Smenu#item0</td>
+ <td>37,6</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[0]/VMenuBar[0]#item3</td>
+ <td>36,10</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[1]/VMenuBar[0]#item4</td>
+ <td>73,6</td>
+</tr>
+<!--Eager mode-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_Smenu#item0</td>
+ <td>36,4</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[0]/VMenuBar[0]#item5</td>
+ <td>36,4</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[1]/VMenuBar[0]#item4</td>
+ <td>98,11</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[2]/VMenuBar[0]#item0</td>
+ <td>30,5</td>
+</tr>
+<!--Enter "abc" and ensure there is one event for each change-->
+<tr>
+ <td>keyDown</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>a</td>
+</tr>
+<tr>
+ <td>keyPress</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>a</td>
+</tr>
+<tr>
+ <td>keyUp</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>a</td>
+</tr>
+<tr>
+ <td>pause</td>
+ <td>100</td>
+ <td></td>
+</tr>
+<tr>
+ <td>keyDown</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>b</td>
+</tr>
+<tr>
+ <td>keyPress</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>b</td>
+</tr>
+<tr>
+ <td>keyUp</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>b</td>
+</tr>
+<tr>
+ <td>pause</td>
+ <td>100</td>
+ <td></td>
+</tr>
+<tr>
+ <td>keyDown</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>c</td>
+</tr>
+<tr>
+ <td>keyPress</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>c</td>
+</tr>
+<tr>
+ <td>keyUp</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>c</td>
+</tr>
+<tr>
+ <td>pause</td>
+ <td>100</td>
+ <td></td>
+</tr>
+<!--Type is needed for a ValueChange to be sent when blurring the field-->
+<tr>
+ <td>type</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>abc</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_SLog/ChildComponentContainer[2]/VLabel[0]</td>
+ <td>2. TextChangeEvent: text='a', cursor position=1 (field cursor pos: 1)</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_SLog/ChildComponentContainer[1]/VLabel[0]</td>
+ <td>3. TextChangeEvent: text='ab', cursor position=2 (field cursor pos: 2)</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td>
+ <td>4. TextChangeEvent: text='abc', cursor position=3 (field cursor pos: 3)</td>
+</tr>
+<!--Lazy mode-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_Smenu#item0</td>
+ <td>36,4</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[0]/VMenuBar[0]#item5</td>
+ <td>36,4</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[1]/VMenuBar[0]#item4</td>
+ <td>98,11</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[2]/VMenuBar[0]#item2</td>
+ <td>30,5</td>
+</tr>
+<!--Set timeout to 5s-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_Smenu#item0</td>
+ <td>11,14</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[0]/VMenuBar[0]#item5</td>
+ <td>28,5</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[1]/VMenuBar[0]#item5</td>
+ <td>74,12</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[2]/VMenuBar[0]#item5</td>
+ <td>49,15</td>
+</tr>
+<!--Enter "def" and ensure there is only one text change event-->
+<tr>
+ <td>keyDown</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>d</td>
+</tr>
+<tr>
+ <td>keyPress</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>d</td>
+</tr>
+<tr>
+ <td>keyUp</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>d</td>
+</tr>
+<tr>
+ <td>pause</td>
+ <td>1000</td>
+ <td></td>
+</tr>
+<tr>
+ <td>keyDown</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>e</td>
+</tr>
+<tr>
+ <td>keyPress</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>e</td>
+</tr>
+<tr>
+ <td>keyUp</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>e</td>
+</tr>
+<tr>
+ <td>pause</td>
+ <td>3000</td>
+ <td></td>
+</tr>
+<tr>
+ <td>keyDown</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>f</td>
+</tr>
+<tr>
+ <td>keyPress</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>f</td>
+</tr>
+<tr>
+ <td>keyUp</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>f</td>
+</tr>
+<!--Wait for the timeout-->
+<tr>
+ <td>pause</td>
+ <td>5000</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td>
+ <td>7. TextChangeEvent: text='abcdef', cursor position=6 (field cursor pos: 6)</td>
+</tr>
+<!--Clear the value-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>-18,15</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td>
+ <td>8. TextChangeEvent: text='', cursor position=0 (field cursor pos: 0)</td>
+</tr>
+<!--Timeout mode (5s)-->
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_Smenu#item0</td>
+ <td>41,8</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[0]/VMenuBar[0]#item5</td>
+ <td>28,7</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[1]/VMenuBar[0]#item4</td>
+ <td>110,8</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::Root/VOverlay[2]/VMenuBar[0]#item1</td>
+ <td>33,9</td>
+</tr>
+<!--Slowly enter "def" and ensure there are several events (one after 500ms with de, another one afterwards with def)-->
+<tr>
+ <td>keyDown</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>d</td>
+</tr>
+<tr>
+ <td>keyPress</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>d</td>
+</tr>
+<tr>
+ <td>keyUp</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>d</td>
+</tr>
+<tr>
+ <td>pause</td>
+ <td>4000</td>
+ <td></td>
+</tr>
+<tr>
+ <td>keyDown</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>e</td>
+</tr>
+<tr>
+ <td>keyPress</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>e</td>
+</tr>
+<tr>
+ <td>keyUp</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>e</td>
+</tr>
+<tr>
+ <td>pause</td>
+ <td>4000</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td>
+ <td>10. TextChangeEvent: text='de', cursor position=2 (field cursor pos: 2)</td>
+</tr>
+<tr>
+ <td>keyDown</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>f</td>
+</tr>
+<tr>
+ <td>keyPress</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>f</td>
+</tr>
+<tr>
+ <td>keyUp</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_StestComponent</td>
+ <td>f</td>
+</tr>
+<!--Wait for the timeout-->
+<tr>
+ <td>pause</td>
+ <td>6000</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentstextfieldTextFieldTest::PID_SLog/ChildComponentContainer[0]/VLabel[0]</td>
+ <td>11. TextChangeEvent: text='def', cursor position=3 (field cursor pos: 3)</td>
+</tr>
+</tbody></table>
+</body>
+</html>
|