Author: vpakan(a)redhat.com
Date: 2010-10-12 11:55:41 -0400 (Tue, 12 Oct 2010)
New Revision: 25754
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/RuleFlowTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/SWTBotJSPMultiPageEditor.java
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/ImportStrutsProjectTest.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/AlwaysHideSelectionBarWithoutPromptTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ShowSelectionTagBarTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java
Log:
Fixes for JBDS 4.0.0.Beta1
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java
===================================================================
---
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/DroolsAllBotTests.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -89,6 +89,7 @@
private static String testDroolsRuntimeLocation = null;
@BeforeClass
public static void setUpTest() {
+ jbt.closeReportUsageWindowIfOpened(false);
DroolsAllBotTests.DROOLS_RUNTIME_LOCATION =
System.getProperty("java.io.tmpdir");
DroolsAllBotTests.CREATE_DROOLS_RUNTIME_LOCATION =
DroolsAllBotTests.DROOLS_RUNTIME_LOCATION + File.separator + "drools";
// Create directory for Drools Runtime which will be created as a part of test
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/RuleFlowTest.java
===================================================================
---
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/RuleFlowTest.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/RuleFlowTest.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -11,6 +11,7 @@
package org.jboss.tools.drools.ui.bot.test.smoke;
+import java.awt.event.KeyEvent;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
@@ -34,6 +35,7 @@
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.ViewType;
@@ -120,17 +122,14 @@
});
// Clear Editor
gefEditor.activateTool("Marquee");
- gefEditor.mouseDrag(0,0,editorBounds.width - editorBounds.x, editorBounds.height -
editorBounds.y);
- KeyboardHelper.pressKeyCode(bot.getDisplay(),(int)SWT.DEL);
+ gefEditor.drag(0,0,editorBounds.width - editorBounds.x, editorBounds.height -
editorBounds.y);
+ gefEditor.setFocus();
+ bot.sleep(Timing.time1S());
+ KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_DELETE);
// Draw each component
String[] tools = new String[]{"Start Event","End
Event","Rule Task",
"Gateway [diverge]","Gateway [converge]","Reusable
Sub-Process",
"Script Task"
- /*
- ,"Timer Event","Error Event","Message
Event","User Task",
-
- "Embedded Sub-Process","Log","Email"
- */
};
int xspacing = 100;
int xoffset = 10;
@@ -138,20 +137,20 @@
int yoffset = 10;
for (int toolIndex = 0;toolIndex < tools.length;toolIndex++){
gefEditor.activateTool(tools[toolIndex]);
- gefEditor.mouseMoveLeftClick(xspacing * (toolIndex % 3) + xoffset,
+ gefEditor.click(xspacing * (toolIndex % 3) + xoffset,
yspacing * (toolIndex / 3) + yoffset);
}
// Add Sequence Flow between Start and End Node
gefEditor.activateTool("Sequence Flow");
// Click on Start Node
- gefEditor.mouseMoveLeftClick(xoffset + 5, yoffset + 5);
+ gefEditor.click(xoffset + 5, yoffset + 5);
// Click on End Node
- gefEditor.mouseMoveLeftClick(xspacing + xoffset + 5, yoffset + 5);
+ gefEditor.click(xspacing + xoffset + 5, yoffset + 5);
gefEditor.save();
checkFullRFFile(DroolsAllBotTests.DROOLS_PROJECT_NAME , ruleFlowFileName);
// check synchronization with Properties View
gefEditor.activateTool("Select");
- gefEditor.mouseMoveLeftClick(xoffset + 5, yoffset + 5);
+ gefEditor.click(xoffset + 5, yoffset + 5);
SWTBotTree tree = eclipse.showView(ViewType.PROPERTIES).tree();
String id = tree.getTreeItem("Id").cell(1);
String name = tree.getTreeItem("Name").cell(1);
@@ -161,9 +160,11 @@
// Delete each component
gefEditor.activateTool("Select");
for (int toolIndex = 0;toolIndex < tools.length;toolIndex++){
- gefEditor.mouseMoveLeftClick(xspacing * (toolIndex % 3) + xoffset + 10,
+ gefEditor.click(xspacing * (toolIndex % 3) + xoffset + 10,
yspacing * (toolIndex / 3) + yoffset + 10);
- KeyboardHelper.pressKeyCode(bot.getDisplay(),(int)SWT.DEL);
+ gefEditor.setFocus();
+ bot.sleep(Timing.time1S());
+ KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_DELETE);
}
// Restore maximized editor
bot.menu(IDELabel.Menu.WINDOW)
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/AddRemoveJSFCapabilitiesTest.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -80,7 +80,7 @@
bot.button("Next >").click();
bot.shell(IDELabel.Shell.IMPORT_JSF_PROJECT).activate();
- bot.textWithLabel("web.xml Location*").setText(webXmlFileLocation);
+ bot.textWithLabel("web.xml Location:*").setText(webXmlFileLocation);
bot.button(WidgetVariables.NEXT_BUTTON).click();
SWTJBTExt.addServerToServerViewOnWizardPage(bot, JBOSS_SERVER_GROUP,
JBOSS_SERVER_TYPE);
bot.sleep(1000L);
Modified:
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/SWTBotJSPMultiPageEditor.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/SWTBotJSPMultiPageEditor.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/SWTBotJSPMultiPageEditor.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -73,7 +73,7 @@
public void run() {
Class<? extends JSPMultiPageEditorPart> cls = JSPMultiPageEditorPart.class;
try {
- Field field = cls.getDeclaredField("container"); //$NON-NLS-1$
+ Field field = cls.getDeclaredField("tabFolderContainer"); //$NON-NLS-1$
field.setAccessible(true);
CTabFolder tabFolder = (CTabFolder) field.get(jspMultiPageEditor);
CTabItem[] tabItems = tabFolder.getItems();
Modified:
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/ImportStrutsProjectTest.java
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/ImportStrutsProjectTest.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/ImportStrutsProjectTest.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -62,7 +62,7 @@
bot.button("Next >").click();
bot.shell(IDELabel.Shell.IMPORT_STRUTS_PROJECT).activate();
- bot.textWithLabel("web.xml Location*").setText(webXmlFileLocation);
+ bot.textWithLabel("web.xml Location:*").setText(webXmlFileLocation);
bot.button(WidgetVariables.NEXT_BUTTON).click();
// Check if there is defined Application Server if not create one
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -507,15 +507,31 @@
* @param cancel selecte if ok or cancel button is used
*/
public void closeReportUsageWindowIfOpened(boolean cancel) {
+ boolean usageWindowAppeared = false;
+ // Check Usage Reporting For JBT
try {
bot.shell("JBoss Tools Usage").activate();
bot.button(
cancel ? IDELabel.Button.CANCEL
: IDELabel.Button.OK).click();
log.info("Report usage window closed");
+ usageWindowAppeared = true;
} catch (WidgetNotFoundException wnfe) {
- log.info("Report usage window didn't appear");
+ // do nothing continue to try to close JBDS Usage Report Dialog
}
+ // Check Usage Reporting For JBDS
+ if (!usageWindowAppeared){
+ try {
+ bot.shell("JBoss Developer Studio Usage").activate();
+ bot.button(
+ cancel ? IDELabel.Button.CANCEL
+ : IDELabel.Button.OK).click();
+ log.info("Report usage window closed");
+ usageWindowAppeared = true;
+ } catch (WidgetNotFoundException wnfe) {
+ log.info("Report usage window didn't appear");
+ }
+ }
}
}
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -565,21 +565,21 @@
public static class CreateGroupDialog{
- public static final String NAME = "Name*";
+ public static final String NAME = "Name:*";
}
public static class AddPaletteGroupDialog{
- public static final String NAME = "Name*";
+ public static final String NAME = "Name:*";
}
public static class AddPaletteMacroDialog{
- public static final String NAME = "Name*";
- public static final String START_TEXT = "Start Text";
- public static final String END_TEXT = "End Text";
+ public static final String NAME = "Name:*";
+ public static final String START_TEXT = "Start Text:";
+ public static final String END_TEXT = "End Text:";
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -158,15 +158,19 @@
}
} catch (Exception e) {
bot.button(0).click();
+ delay();
SWTBotTree innerTree = bot.tree();
delay();
innerTree.expandNode(JBOSS_SERVER_GROUP).select(JBOSS_SERVER_RUNTIME_TYPE);
//$NON-NLS-1$ //$NON-NLS-2$
- delay();
+ bot.sleep(Timing.time1S());
bot.button("Next >").click(); //$NON-NLS-1$
+ bot.sleep(Timing.time1S());
bot.textWithLabel("Home Directory").setText(JBOSS_EAP_HOME); //$NON-NLS-1$
+ bot.sleep(Timing.time1S());
bot.button("Finish").click(); //$NON-NLS-1$
- delay();
+ bot.sleep(Timing.time10S());
bot.button("Finish").click(); //$NON-NLS-1$
+ bot.sleep(Timing.time10S());
try {
bot.button("Yes").click(); //$NON-NLS-1$
openErrorLog();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/AlwaysHideSelectionBarWithoutPromptTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/AlwaysHideSelectionBarWithoutPromptTest.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/AlwaysHideSelectionBarWithoutPromptTest.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -33,7 +33,6 @@
//Test Hide Selection Bar button without confirm
- selectPrompt();
bot.toolbarButtonWithTooltip(HID_SEL_BAR).click();
checkIsHide();
@@ -43,14 +42,6 @@
openPage();
checkIsHide();
- //Test Hide Selection Bar button with confirm
-
- selectPrompt();
- selectSelection();
- bot.toolbarButtonWithTooltip(HID_SEL_BAR).click();
- bot.shell("Confirm hide selection bar").activate();
- bot.button(IDELabel.Button.OK).click();
- checkIsHide();
}
private void checkIsHide(){
@@ -74,17 +65,7 @@
}
private void selectSelection(){
- bot.toolbarButtonWithTooltip(PREF_TOOLTIP).click();
- bot.shell(PREF_FILTER_SHELL_TITLE).activate();
- bot.checkBox(SHOW_SELECTION_TAG_BAR).click();
- bot.button("OK").click(); //$NON-NLS-1$
+ bot.toolbarToggleButton(SHOW_SELECTION_BAR).click();
}
- private void selectPrompt(){
- bot.toolbarButtonWithTooltip(PREF_TOOLTIP).click();
- bot.shell(PREF_FILTER_SHELL_TITLE).activate();
- bot.checkBox(ASK_FOR_CONFIRM).click();
- bot.button("OK").click(); //$NON-NLS-1$
- }
-
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -7,17 +7,19 @@
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarToggleButton;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.vpe.ui.bot.test.Activator;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
public abstract class PreferencesTestCase extends VPEAutoTestCase{
- protected static final String SHOW_SELECTION_TAG_BAR = "Show selection tag
bar"; //$NON-NLS-1$
+ protected static final String SHOW_SELECTION_BAR = "Show Selection Bar";
//$NON-NLS-1$
protected static final String SHOW_NON_VISUAL_TAGS = "Show non-visual tags";
//$NON-NLS-1$
protected static final String SHOW_BORDER_FOR_UNKNOWN_TAGS = "Show border for
unknown tags"; //$NON-NLS-1$
protected static final String SHOW_RESOURCE_BUNDLES = "Show resource bundles usage
as EL expressions"; //$NON-NLS-1$
protected static final String ASK_FOR_ATTRIBUTES = "Ask for tag attributes during
tag insert"; //$NON-NLS-1$
- protected static final String ASK_FOR_CONFIRM = "Ask for confirmation when closing
Selection Bar"; //$NON-NLS-1$
protected static final String SELECT_DEFAULT_TAB = "Select the default active
editor's tab"; //$NON-NLS-1$
protected static final String EDITOR_SPLITTING = "Visual/Source editors
splitting"; //$NON-NLS-1$
protected static final String SHOW_TEXY_FORMAT = "Show text formatting bar";
//$NON-NLS-1$
@@ -62,23 +64,34 @@
protected void setUp() throws Exception {
super.setUp();
openPage();
- bot.toolbarButtonWithTooltip(PREF_TOOLTIP).click();
- bot.shell(PREF_FILTER_SHELL_TITLE).activate();
- setPreferencesToDefault();
- bot.button("OK").click(); //$NON-NLS-1$
+ setPreferencesToDefault(true);
}
@Override
protected void tearDown() throws Exception {
openPage();
- bot.toolbarButtonWithTooltip("Preferences").click(); //$NON-NLS-1$
- bot.shell("Preferences (Filtered)").activate(); //$NON-NLS-1$
- setPreferencesToDefault();
- bot.button("OK").click(); //$NON-NLS-1$
+ setPreferencesToDefault(true);
super.tearDown();
}
- void setPreferencesToDefault() throws WidgetNotFoundException{
+ void setPreferencesToDefault(boolean fromEditor) throws WidgetNotFoundException{
+ SWTBotToolbarToggleButton tbShowSelectionBar =
bot.toolbarToggleButton(SHOW_SELECTION_BAR);
+ if (!tbShowSelectionBar.isChecked()){
+ tbShowSelectionBar.click();
+ }
+ if (fromEditor){
+ bot.toolbarButtonWithTooltip(PREF_TOOLTIP).click(); //$NON-NLS-1$
+ bot.shell(PREF_FILTER_SHELL_TITLE).activate(); //$NON-NLS-1$
+ }
+ else{
+ bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.PREFERENCES).click();
//$NON-NLS-1$ //$NON-NLS-2$
+ SWTBotTree preferenceTree = bot.tree();
+ preferenceTree
+ .expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS) //$NON-NLS-1$
+ .expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS_WEB) //$NON-NLS-1$
+ .expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS_WEB_EDITORS) //$NON-NLS-1$
+ .expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS_WEB_EDITORS_VPE).select();
+ }
SWTBotCheckBox checkBox = bot.checkBox(SHOW_BORDER_FOR_UNKNOWN_TAGS);
if (!checkBox.isChecked()) {
checkBox.click();
@@ -87,10 +100,7 @@
if (checkBox.isChecked()) {
checkBox.click();
}
- checkBox = bot.checkBox(SHOW_SELECTION_TAG_BAR);
- if (!checkBox.isChecked()) {
- checkBox.click();
- }
+
checkBox = bot.checkBox(SHOW_RESOURCE_BUNDLES);
if (checkBox.isChecked()) {
checkBox.click();
@@ -99,10 +109,6 @@
if (!checkBox.isChecked()) {
checkBox.click();
}
- checkBox = bot.checkBox(ASK_FOR_CONFIRM);
- if (!checkBox.isChecked()) {
- checkBox.click();
- }
checkBox = bot.checkBox(SHOW_TEXY_FORMAT);
if (!checkBox.isChecked()) {
checkBox.click();
@@ -111,6 +117,7 @@
combo.setSelection("Visual/Source"); //$NON-NLS-1$
combo = bot.comboBoxWithLabel(EDITOR_SPLITTING);
combo.setSelection("Vertical splitting with Source Editor on the top");
//$NON-NLS-1$
+ bot.button("OK").click(); //$NON-NLS-1$
}
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ShowSelectionTagBarTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ShowSelectionTagBarTest.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ShowSelectionTagBarTest.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -29,27 +29,11 @@
closePage();
openPage();
checkIsShow();
-
- //Test Hide Selection Bar button with confirm
-
- bot.toolbarButtonWithTooltip(HID_SEL_BAR).click();
- bot.shell("Confirm hide selection bar").activate(); //$NON-NLS-1$
- bot.button("OK").click(); //$NON-NLS-1$
- checkIsHide();
- //Test Show selection after reopen
-
- closePage();
- openPage();
- checkIsHide();
-
}
private void selectSelection(){
- bot.toolbarButtonWithTooltip(PREF_TOOLTIP).click();
- bot.shell(PREF_FILTER_SHELL_TITLE).activate();
- bot.checkBox(SHOW_SELECTION_TAG_BAR).click();
- bot.button("OK").click(); //$NON-NLS-1$
+ bot.toolbarToggleButton(SHOW_SELECTION_BAR).click();
}
private void checkIsHide(){
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java 2010-10-12
15:49:57 UTC (rev 25753)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java 2010-10-12
15:55:41 UTC (rev 25754)
@@ -2,15 +2,11 @@
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
public class CancelTagLibDefenitionTest extends VPEAutoTestCase{
- @Override
- protected void createJSFProject(String jsfProjectName) {
- super.createJSFProject(jsfProjectName);
- }
-
public void testCancelTagLibDefenition(){
openPalette();
openPage();
@@ -23,20 +19,23 @@
bot.button("Browse...").click(); //$NON-NLS-1$
bot.shell("Edit TLD").activate(); //$NON-NLS-1$
-
+ delay();
//Test cancel TLD
SWTBotTree tree = bot.tree();
delay();
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("html_basic.tld
[h]").select(); //$NON-NLS-1$ //$NON-NLS-2$
+ SWTBotTreeItem item =
tree.expandNode(projectProperties.getProperty("JSFProjectName"));
+ delay();
+ item.getNode("html_basic.tld [h]").select(); //$NON-NLS-1$ //$NON-NLS-2$
+ delay();
bot.button("Cancel").click(); //$NON-NLS-1$
//Test check fields
bot.shell("Import Tags from TLD File").activate(); //$NON-NLS-1$
- assertEquals("", bot.textWithLabel("TLD File*").getText());
//$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("", bot.textWithLabel("Name*").getText());
//$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("", bot.textWithLabel("Default Prefix").getText());
//$NON-NLS-1$ //$NON-NLS-2$
- assertEquals("", bot.textWithLabel("Library URI").getText());
//$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("", bot.textWithLabel("TLD File:*").getText());
//$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("", bot.textWithLabel("Name:*").getText());
//$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("", bot.textWithLabel("Default Prefix:").getText());
//$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals("", bot.textWithLabel("Library URI:").getText());
//$NON-NLS-1$ //$NON-NLS-2$
bot.button("Cancel").click(); //$NON-NLS-1$
}