Author: vpakan(a)redhat.com
Date: 2010-07-14 06:13:42 -0400 (Wed, 14 Jul 2010)
New Revision: 23402
Modified:
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileRenameHelper.java
trunk/jst/tests/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/VPEEditorTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/AddSubstitutedELExpressionFolderScopeTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/PageDesignTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.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/palette/CancelTagLibDefenitionTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/RenameXHTMLFileTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/VPESourceCodeTemplatesPreferencePageTest.java
Log:
Fixes for JBT 3.2.0.M1
Modified:
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -25,7 +25,7 @@
public static final String NEW_BUTTON = "New..."; //$NON-NLS-1$
public static final String WINDOW_MENU = "Window"; //$NON-NLS-1$
public static final String PREFERENCES = "Preferences"; //$NON-NLS-1$
- public static final String VPE_TEMPLATES_TAB = "Templates"; //$NON-NLS-1$
+ public static final String VPE_TEMPLATES_TAB = "Visual Templates";
//$NON-NLS-1$
public static final String PREF_FILTER_SHELL_TITLE = "Preferences
(Filtered)"; //$NON-NLS-1$
public static final String ADD_BUTTON = "Add"; //$NON-NLS-1$
public static final String EDIT_BUTTON = "Edit"; //$NON-NLS-1$
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -3453,7 +3453,7 @@
*/
public static final String CHB_ADD_PROJECT_TO_WORKING_SETS = "Add project to
working sets";
}
- public static class JBossToolsWebJSPFile {
+ public static class WebJSPFile {
/**
* represents item : JBoss Tools Web->JSP File
*/
@@ -3461,7 +3461,7 @@
public String getName() { return "JSP File";}
public List<String> getGroupPath() {
List<String> l = new Vector<String>();
- l.add("JBoss Tools Web");
+ l.add("Web");
return l;
}
};
@@ -3470,9 +3470,9 @@
*/
public static final String TEXT_FOLDER = "Folder*";
/**
- * text field labeled 'Name*'
+ * text field labeled 'File name'
*/
- public static final String TEXT_NAME = "Name*";
+ public static final String TEXT_FILE_NAME = "File name:";
}
public static class SeamSeamConversation {
/**
@@ -4112,7 +4112,7 @@
* represents item : Web->JSP
*/
public static final INewObject LABEL = new INewObject() {
- public String getName() { return "JSP";}
+ public String getName() { return "JSP File";}
public List<String> getGroupPath() {
List<String> l = new Vector<String>();
l.add("Web");
@@ -4683,7 +4683,7 @@
* represents item : JBoss Tools Web->XHTML File
*/
public static final INewObject LABEL = new INewObject() {
- public String getName() { return "XHTML File";}
+ public String getName() { return "XHTML Page";}
public List<String> getGroupPath() {
List<String> l = new Vector<String>();
l.add("JBoss Tools Web");
@@ -4697,7 +4697,7 @@
/**
* text field labeled 'Name*'
*/
- public static final String TEXT_NAME = "Name*";
+ public static final String TEXT_FILE_NAME = "File name:";
}
public static class JBossToolsWebHTMLFile {
/**
@@ -4725,7 +4725,7 @@
* represents item : Web->CSS
*/
public static final INewObject LABEL = new INewObject() {
- public String getName() { return "CSS";}
+ public String getName() { return "CSS File";}
public List<String> getGroupPath() {
List<String> l = new Vector<String>();
l.add("Web");
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileRenameHelper.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileRenameHelper.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileRenameHelper.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -31,7 +31,7 @@
*
*/
public class FileRenameHelper {
- private static final int sleepTime = 1000;
+ private static final int sleepTime = Timing.time2S();
/**
* Check File Renaming
* @param bot
@@ -53,14 +53,14 @@
if (treePathItems != null && treePathItems.length > 0){
SWTBotTreeItem parentTreeItem = tree.getTreeItem(treePathItems[0]);
parentTreeItem.expand();
- bot.sleep(1000);
+ bot.sleep(Timing.time1S());
parentTreeItem.select();
- bot.sleep(1000);
+ bot.sleep(Timing.time1S());
// Do not remove this part of code otherwise tree view is not populated properly
parentTreeItem.collapse();
- bot.sleep(1000);
+ bot.sleep(Timing.time1S());
parentTreeItem.expand();
- bot.sleep(1000);
+ bot.sleep(Timing.time1S());
int index = 1;
while (treePathItems.length > index){
parentTreeItem = parentTreeItem.getNode(treePathItems[index]);
@@ -79,6 +79,7 @@
.setText(newFileName);
bot.button(IDELabel.Button.OK).click();
new SWTUtilExt(bot).waitForAll(60 * 1000L);
+ bot.sleep(Timing.time5S());
// Check Results
// File with Old Name doesn't exists within WebProjects View
try{
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -110,9 +110,9 @@
public static final String NEW = "New";
public static final String SAVE_RESOURCE = "Save Resource";
public static final String RENAME_RESOURCE = "Rename Resource";
- public static final String NEW_JSP_FILE = "New File JSP";
+ public static final String NEW_JSP_FILE = "New JSP File";
public static final String PROPERTIES = "Properties";
- public static final String NEW_XHTML_FILE = "New File XHTML";
+ public static final String NEW_XHTML_FILE = "New XHTML Page";
public static final String IMPORT_JSF_PROJECT = "Import JSF Project";
public static final String IMPORT = "Import";
public static final String DELETE_SERVER = "Delete Server";
@@ -280,6 +280,7 @@
public static final String NAME = "Name*";
public static final String TEMPLATE = "Template";
public static final String TEMPLATE_JSF_BASE_PAGE = "JSFBasePage";
+ public static final String JSP_TEMPLATE = "New JSP File (html)";
}
@@ -294,6 +295,8 @@
public static final String NAME = "Name*";
public static final String TEMPLATE = "Template";
public static final String TEMPLATE_FACELET_FORM_XHTML =
"FaceletForm.xhtml";
+ public static final String TEMPLATE_FACELET_FORM_XHTML_NAME = "Form Facelet
Page";
+ public static final String USE_XHTML_TEMPLATE_CHECK_BOX = "Use XHTML
Template";
}
@@ -344,8 +347,12 @@
public static final String SERVER_GROUP = "Server";
public static final String RUNTIME_ENVIRONMENTS = "Runtime Environments";
public static final String DROOLS_GROUP = "Drools";
- public static final String INSTALLED_DROOLS_RUNTIMES = "Installed Drools
Runtimes";
-
+ public static final String INSTALLED_DROOLS_RUNTIMES = "Installed Drools
Runtimes";
+ public static final String JBOSS_TOOLS = "JBoss Tools";
+ public static final String JBOSS_TOOLS_WEB = "Web";
+ public static final String JBOSS_TOOLS_WEB_EDITORS = "Editors";
+ public static final String JBOSS_TOOLS_WEB_EDITORS_VPE = "Visual Page
Editor";
+ public static final String JBOSS_TOOLS_WEB_EDITORS_VPE_VISUAL_TEMPLATES =
"Visual Templates";
}
public static class JBossServerRuntimeDialog {
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-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -348,4 +348,10 @@
protected abstract boolean isUnuseDialogOpened();
+ protected void openPage(){
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBotTree tree = innerBot.tree();
+ tree.expandNode(JBT_TEST_PROJECT_NAME)
+
.expandNode("WebContent").expandNode("pages").getNode(TEST_PAGE).doubleClick();
//$NON-NLS-1$ //$NON-NLS-2$
+ }
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -8,6 +8,7 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.ui.bot.test.Activator;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
@@ -74,6 +75,7 @@
bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$
//$NON-NLS-2$
editor.setText(editorText);
editor.save();
+ bot.sleep(Timing.time2S());
}
super.tearDown();
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/AddSubstitutedELExpressionFolderScopeTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/AddSubstitutedELExpressionFolderScopeTest.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/AddSubstitutedELExpressionFolderScopeTest.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -5,6 +5,8 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class AddSubstitutedELExpressionFolderScopeTest extends SubstitutedELTestCase{
@@ -40,11 +42,11 @@
innerBot.tree().expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent")
//$NON-NLS-1$
.getNode(TEST_FOLDER).select();
- bot.menu("File").menu("New").menu("JSP File").click();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ open.newObject(ActionItem.NewObject.WebJSP.LABEL);
- bot.shell("New File JSP").activate(); //$NON-NLS-1$
- bot.textWithLabel("Name*").setText(TEST_PAGE_FOR_FOLDER); //$NON-NLS-1$
- bot.button("Finish").click(); //$NON-NLS-1$
+ bot.shell(IDELabel.Shell.NEW_JSP_FILE).activate(); //$NON-NLS-1$
+ bot.textWithLabel(ActionItem.NewObject.WebJSP.TEXT_FILE_NAME).setText(TEST_PAGE_FOR_FOLDER);
//$NON-NLS-1$
+ bot.button(IDELabel.Button.FINISH).click(); //$NON-NLS-1$
delay();
SWTBotEclipseEditor editorForTestPage =
bot.editorByTitle(TEST_PAGE_FOR_FOLDER+".jsp").toTextEditor(); //$NON-NLS-1$
editorForTestPage.setText(getEditorText());
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/PageDesignTestCase.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/PageDesignTestCase.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/PageDesignTestCase.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -5,10 +5,7 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.ui.bot.test.Activator;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
@@ -39,13 +36,6 @@
bot.editorByTitle(TEST_PAGE).close();
}
- void openPage(){
- SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
- SWTBotTree tree = innerBot.tree();
- tree.expandNode(JBT_TEST_PROJECT_NAME)
- .expandNode("WebContent").expandNode("pages").getNode(TEST_PAGE).doubleClick();
//$NON-NLS-1$ //$NON-NLS-2$
- }
-
@Override
protected String getPathToResources(String testPage) throws IOException {
String filePath =
FileLocator.toFileURL(Platform.getBundle(Activator.PLUGIN_ID).getEntry("/")).getFile()+"resources/pagedesign/"+testPage;
//$NON-NLS-1$//$NON-NLS-2$
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -2,6 +2,8 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class ChangeEditorTabForTheFirstOpenPageTest extends PreferencesTestCase{
@@ -22,10 +24,10 @@
innerBot.tree().expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent")
//$NON-NLS-1$
.getNode("pages").select(); //$NON-NLS-1$
- bot.menu("File").menu("New").menu("JSP File").click();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- bot.shell("New File JSP").activate(); //$NON-NLS-1$
- bot.textWithLabel("Name*").setText("testPage"); //$NON-NLS-1$
//$NON-NLS-2$
- bot.button("Finish").click(); //$NON-NLS-1$
+ open.newObject(ActionItem.NewObject.WebJSP.LABEL);
+ bot.shell(IDELabel.Shell.NEW_JSP_FILE).activate(); //$NON-NLS-1$
+ bot.textWithLabel(ActionItem.NewObject.WebJSP.TEXT_FILE_NAME).setText("testPage");
//$NON-NLS-1$ //$NON-NLS-2$
+ bot.button(IDELabel.Button.FINISH).click(); //$NON-NLS-1$
bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).setFocus();
//Check if the tab changed
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-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/PreferencesTestCase.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -4,12 +4,9 @@
import java.io.IOException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.swtbot.swt.finder.SWTBot;
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.SWTBotTree;
-import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.ui.bot.test.Activator;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
@@ -51,13 +48,6 @@
bot.editorByTitle(TEST_PAGE).close();
}
- void openPage(){
- SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
- SWTBotTree tree = innerBot.tree();
- tree.expandNode(JBT_TEST_PROJECT_NAME)
- .expandNode("WebContent").expandNode("pages").getNode(TEST_PAGE).doubleClick();
//$NON-NLS-1$ //$NON-NLS-2$
- }
-
@Override
protected String getPathToResources(String testPage) throws IOException {
String filePath =
FileLocator.toFileURL(Platform.getBundle(Activator.PLUGIN_ID).getEntry("/")).getFile()+"resources/preferences/"+testPage;
//$NON-NLS-1$ //$NON-NLS-2$
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-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -9,13 +9,12 @@
@Override
protected void createJSFProject(String jsfProjectName) {
super.createJSFProject(jsfProjectName);
- openPalette();
}
public void testCancelTagLibDefenition(){
-
+ openPalette();
+ openPage();
//Test open import dialog
-
bot.viewByTitle("JBoss Tools Palette").setFocus(); //$NON-NLS-1$
bot.toolbarButtonWithTooltip("Import").click(); //$NON-NLS-1$
bot.shell("Import Tags from TLD File").activate(); //$NON-NLS-1$
@@ -28,7 +27,7 @@
//Test cancel TLD
SWTBotTree tree = bot.tree();
delay();
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("x-1_0-rt.tld
[x_rt]").select(); //$NON-NLS-1$ //$NON-NLS-2$
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("html_basic.tld
[h]").select(); //$NON-NLS-1$ //$NON-NLS-2$
bot.button("Cancel").click(); //$NON-NLS-1$
//Test check fields
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -68,7 +68,7 @@
bot.shell("Edit TLD").activate(); //$NON-NLS-1$
SWTBotTree tree = bot.tree();
delay();
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("c.tld
[c]").select(); //$NON-NLS-1$ //$NON-NLS-2$
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("html_basic.tld
[h]").select(); //$NON-NLS-1$ //$NON-NLS-2$
bot.button("OK").click(); //$NON-NLS-1$
//Test set group
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -13,6 +13,8 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.ui.bot.test.editor.VPEEditorTestCase;
@@ -55,12 +57,14 @@
webContentTreeItem.select();
// create new JSP file
-
bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.NEW).menu(IDELabel.Menu.JSP_FILE).click();
+ open.newObject(ActionItem.NewObject.WebJSP.LABEL);
bot.shell(IDELabel.Shell.NEW_JSP_FILE).activate();
- bot.textWithLabel(IDELabel.NewJSPFileDialog.NAME).setText(TEST_NEW_JSP_FILE_NAME);
-
bot.comboBoxWithLabel(IDELabel.NewJSPFileDialog.TEMPLATE).setText(IDELabel.NewJSPFileDialog.TEMPLATE_JSF_BASE_PAGE);
+
bot.textWithLabel(ActionItem.NewObject.WebJSP.TEXT_FILE_NAME).setText(TEST_NEW_JSP_FILE_NAME);
+ bot.button(IDELabel.Button.NEXT).click();
+ bot.table().select(IDELabel.NewJSPFileDialog.JSP_TEMPLATE);
bot.button(IDELabel.Button.FINISH).click();
-
+ bot.sleep(Timing.time2S());
+ webContentTreeItem.expand();
SWTBotTreeItem jspTestPageTreeItem =
webContentTreeItem.getNode(TEST_NEW_JSP_FILE_NAME);
String checkResult = CheckFileChangesSaving.checkIt(bot,
bot.editorByTitle(TEST_NEW_JSP_FILE_NAME).toTextEditor(),
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/RenameXHTMLFileTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/RenameXHTMLFileTest.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/RenameXHTMLFileTest.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -28,7 +28,7 @@
private static final String NEW_XHTML_FILE_NAME = "renamed-"
+ XHTMLPageCreationTest.TEST_NEW_XHTML_FILE_NAME;
- public void testRenameFacesConfigFile() throws Throwable {
+ public void testRenameXHTMLFile() throws Throwable {
checkRenameXHTMLFile();
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -13,6 +13,7 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.ui.bot.test.editor.VPEEditorTestCase;
@@ -56,10 +57,12 @@
webContentTreeItem.select();
// create new JSP file
-
bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.NEW).menu(IDELabel.Menu.XHTML_FILE).click();
+ open.newObject(ActionItem.NewObject.JBossToolsWebXHTMLFile.LABEL);
bot.shell(IDELabel.Shell.NEW_XHTML_FILE).activate();
-
bot.textWithLabel(IDELabel.NewXHTMLFileDialog.NAME).setText(TEST_NEW_XHTML_FILE_NAME);
-
bot.comboBoxWithLabel(IDELabel.NewXHTMLFileDialog.TEMPLATE).setText(IDELabel.NewXHTMLFileDialog.TEMPLATE_FACELET_FORM_XHTML);
+
bot.textWithLabel(ActionItem.NewObject.JBossToolsWebXHTMLFile.TEXT_FILE_NAME).setText(TEST_NEW_XHTML_FILE_NAME);
+ bot.button(IDELabel.Button.NEXT).click();
+ bot.checkBox(IDELabel.NewXHTMLFileDialog.USE_XHTML_TEMPLATE_CHECK_BOX).select();
+ bot.table().select(IDELabel.NewXHTMLFileDialog.TEMPLATE_FACELET_FORM_XHTML_NAME);
bot.button(IDELabel.Button.FINISH).click();
SWTBotTreeItem xhtmlTestPageTreeItem =
webContentTreeItem.getNode(TEST_NEW_XHTML_FILE_NAME);
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -12,6 +12,7 @@
import java.io.File;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
@@ -64,14 +65,14 @@
/*
* Check that templates have been added to the preference page
*/
- bot.menu("Window").menu("Preferences").click(); //$NON-NLS-1$
//$NON-NLS-2$
- bot.shell("Preferences").activate(); //$NON-NLS-1$
+ bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.PREFERENCES).click();
//$NON-NLS-1$ //$NON-NLS-2$
+ bot.shell(IDELabel.Shell.PREFERENCES).activate(); //$NON-NLS-1$
importTree = bot.tree();
- importTree.expandNode("JBoss Tools") //$NON-NLS-1$d
- .expandNode("Web") //$NON-NLS-1$
- .expandNode("Editors") //$NON-NLS-1$
- .select("Visual Page Editor"); //$NON-NLS-1$
- bot.tabItem("Templates").activate(); //$NON-NLS-1$
+ importTree.expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS) //$NON-NLS-1$d
+ .expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS_WEB) //$NON-NLS-1$
+ .expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS_WEB_EDITORS) //$NON-NLS-1$
+ .select(IDELabel.PreferencesDialog.JBOSS_TOOLS_WEB_EDITORS_VPE); //$NON-NLS-1$
+ bot.tabItem(IDELabel.PreferencesDialog.JBOSS_TOOLS_WEB_EDITORS_VPE_VISUAL_TEMPLATES).activate();
//$NON-NLS-1$
/*
* Check table values on the preferences page
*/
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -11,6 +11,8 @@
package org.jboss.tools.vpe.ui.bot.test.wizard;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
@@ -36,15 +38,13 @@
/*
* Open wizard page
*/
- this.bot.menu("File").menu("New").menu("Other...").click();
//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- this.bot.shell("New").activate(); //$NON-NLS-1$
- SWTBotTree importTree = this.bot.tree();
- importTree.expandNode("JBoss Tools Web").select("XHTML File");
//$NON-NLS-1$//$NON-NLS-2$
- this.bot.button(WidgetVariables.NEXT_BUTTON).click();
- this.bot.shell("New File XHTML"); //$NON-NLS-1$
- this.bot.textWithLabel("Name*").setText("test"); //$NON-NLS-1$
//$NON-NLS-2$
- this.bot.button(WidgetVariables.NEXT_BUTTON).click();
- this.bot.button(WidgetVariables.FINISH_BUTTON).click();
+ open.newObject(ActionItem.NewObject.JBossToolsWebXHTMLFile.LABEL);
+ bot.shell(IDELabel.Shell.NEW_XHTML_FILE).activate();
+
bot.textWithLabel(ActionItem.NewObject.JBossToolsWebXHTMLFile.TEXT_FILE_NAME).setText("test");
+ bot.button(IDELabel.Button.NEXT).click();
+ bot.checkBox(IDELabel.NewXHTMLFileDialog.USE_XHTML_TEMPLATE_CHECK_BOX).select();
+ bot.table().select(IDELabel.NewXHTMLFileDialog.TEMPLATE_FACELET_FORM_XHTML_NAME);
+ bot.button(IDELabel.Button.FINISH).click();
assertEquals("Active Editor Title should be" ,"test.xhtml",
this.bot.activeEditor().getTitle()); //$NON-NLS-1$ //$NON-NLS-2$
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/VPESourceCodeTemplatesPreferencePageTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/VPESourceCodeTemplatesPreferencePageTest.java 2010-07-14
09:43:07 UTC (rev 23401)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/VPESourceCodeTemplatesPreferencePageTest.java 2010-07-14
10:13:42 UTC (rev 23402)
@@ -13,6 +13,7 @@
import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
/**
@@ -26,17 +27,17 @@
//just open a VPE Source Code templates preference test page
public void testSourceCodeTemplatesPreferencePage() {
- this.bot.menu("Window").menu("Preferences").click(); //$NON-NLS-1$
//$NON-NLS-2$
+ this.bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.PREFERENCES).click();
//$NON-NLS-1$ //$NON-NLS-2$
SWTBotTree preferenceTree = this.bot.tree();
preferenceTree
- .expandNode("JBoss Tools") //$NON-NLS-1$
- .expandNode("Web") //$NON-NLS-1$
- .expandNode("Editors") //$NON-NLS-1$
- .expandNode("Visual Page Editor").select(); //$NON-NLS-1$
- bot.tabItem("Templates").activate(); //$NON-NLS-1$
+ .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();
//$NON-NLS-1$
+ bot.tabItem(IDELabel.PreferencesDialog.JBOSS_TOOLS_WEB_EDITORS_VPE_VISUAL_TEMPLATES).activate();
//$NON-NLS-1$
try{
- this.bot.button("Add").click(); //$NON-NLS-1$
- this.bot.button("Cancel").click(); //$NON-NLS-1$
+ this.bot.button(IDELabel.Button.ADD_WITHOUT_DOTS).click(); //$NON-NLS-1$
+ this.bot.button(IDELabel.Button.CANCEL).click(); //$NON-NLS-1$
} catch(WidgetNotFoundException ex){
fail("Preference Page has not been created"+ex);//$NON-NLS-1$
}finally{