Преглед на файлове

TestBench test for #8193 now that #8827 is fixed

svn changeset:24175/svn branch:6.8
tags/7.0.0.beta1
Johannes Dahlström преди 11 години
родител
ревизия
946ce4708d

+ 152
- 0
tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.html Целия файл

@@ -0,0 +1,152 @@
<?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="http://localhost:8068/" />
<title>PopupViewClickShortcut</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">PopupViewClickShortcut</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/run/com.vaadin.tests.components.popupview.PopupViewClickShortcut?restartApplication=</td>
<td></td>
</tr>
<tr>
<td>pressSpecialKey</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::</td>
<td>ctrl alt M</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[5]/domChild[0]/domChild[0]</td>
<td>added 5</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::PID_SLog_row_0</td>
<td>1. Submitted from Main window</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VPopupView[0]</td>
<td>57,6</td>
</tr>
<tr>
<td>pressSpecialKey</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::</td>
<td>ctrl alt P</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VPopupView[0]/VPopupView$CustomPopup[0]/VCaptionWrapper[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]</td>
<td>159,142</td>
</tr>
<tr>
<td>pressSpecialKey</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VPopupView[0]/VPopupView$CustomPopup[0]/VCaptionWrapper[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]</td>
<td>ctrl alt P</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VPopupView[0]/VPopupView$CustomPopup[0]/VCaptionWrapper[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[6]/domChild[0]/domChild[0]</td>
<td>added 6</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::PID_SLog_row_1</td>
<td>2. Submitted from Popup</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::PID_SLog_row_0</td>
<td>3. Submitted from Popup</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]</td>
<td>83,151</td>
</tr>
<tr>
<td>pressSpecialKey</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]</td>
<td>ctrl alt S</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[5]/domChild[0]/domChild[0]</td>
<td>added 5</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::PID_SLog_row_0</td>
<td>4. Submitted from Subwindow</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[2]/VPopupView[0]</td>
<td>76,4</td>
</tr>
<tr>
<td>pressSpecialKey</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VWindow[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td>
<td>ctrl alt U</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[2]/VPopupView[0]/VPopupView$CustomPopup[0]/VCaptionWrapper[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[5]/domChild[0]/domChild[0]</td>
<td>132,11</td>
</tr>
<tr>
<td>pressSpecialKey</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[2]/VPopupView[0]/VPopupView$CustomPopup[0]/VCaptionWrapper[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]</td>
<td>ctrl alt U</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[2]/VPopupView[0]/VPopupView$CustomPopup[0]/VCaptionWrapper[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[6]/domChild[0]/domChild[0]</td>
<td>added 6</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::PID_SLog_row_1</td>
<td>5. Submitted from Subwindow popup</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::PID_SLog_row_0</td>
<td>6. Submitted from Subwindow popup</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::/VVerticalLayout[0]/domChild[0]/domChild[1]</td>
<td>279,482</td>
</tr>
<tr>
<td>pressSpecialKey</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::</td>
<td>ctrl alt P</td>
</tr>
<tr>
<td>pressSpecialKey</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::</td>
<td>ctrl alt U</td>
</tr>
<tr>
<td>pressSpecialKey</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::</td>
<td>ctrl alt S</td>
</tr>
<tr>
<td>assertText</td>
<td>vaadin=runcomvaadintestscomponentspopupviewPopupViewClickShortcut::PID_SLog_row_0</td>
<td>6. Submitted from Subwindow popup</td>
</tr>

</tbody></table>
</body>
</html>

+ 8
- 9
tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java Целия файл

@@ -46,16 +46,15 @@ public class PopupViewClickShortcut extends TestBase {
l.setWidth(null);

Button b = new Button("Submit " + caption + " (Ctrl+Alt+"
+ String.valueOf(Character.toChars(keyCode)) + ")",
new Button.ClickListener() {
private int i = 5;
+ (char) keyCode + ")", new Button.ClickListener() {
private int i = 5;

public void buttonClick(ClickEvent event) {
log.log("Submitted from "
+ event.getButton().getParent().getCaption());
t.addItem(new String[] { "added " + i++ }, i);
}
});
public void buttonClick(ClickEvent event) {
log.log("Submitted from "
+ event.getButton().getParent().getCaption());
t.addItem(new String[] { "added " + i++ }, i);
}
});
b.setClickShortcut(keyCode, ModifierKey.CTRL, ModifierKey.ALT);

l.addComponent(t);

Loading…
Отказ
Запис