Author: vpakan(a)redhat.com
Date: 2011-10-27 11:55:50 -0400 (Thu, 27 Oct 2011)
New Revision: 36046
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java
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/ViewType.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/JspFileEditingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MenuItemEntity.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/VisualEditorContextMenuTest.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/smoke/CodeCompletionTest.java
Log:
Fixes for JBT 3.3.0.M4
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -50,7 +50,7 @@
9,
0,
expectedProposals);
- // Check content assist for ${msg. prefix
+ // Check content assist for #{msg. prefix
expectedProposals.clear();
expectedProposals.add("name : String - Person");
ContentAssistHelper.checkContentAssistContent(SWTTestExt.bot,
@@ -76,7 +76,7 @@
0);
contentAssist.checkContentAssist("msg", false);
contentAssist.checkContentAssist("person : Person", false);
- // Check content assist for ${msg. prefix
+ // Check content assist for #{msg. prefix
SWTJBTExt.selectTextInSourcePane(SWTTestExt.bot,
FACELETS_TEST_PAGE,
textForSelection,
@@ -235,7 +235,7 @@
bot.sleep(Timing.time2S());
compositeComponentDefEditor.save();
currentLineText = compositeComponentDefEditor.getTextOnCurrentLine();
- expectedInsertedText = "${cc.attrs}";
+ expectedInsertedText = "#{cc.attrs}";
assertTrue("Inserted text should be " + expectedInsertedText + " but
is not.\n"
+ "Current line text is " + currentLineText,
currentLineText.toLowerCase().contains(expectedInsertedText.toLowerCase()));
@@ -244,14 +244,14 @@
// Check content assist menu content for Composite Components attributes
ContentAssistHelper.checkContentAssistContent(SWTTestExt.bot,
compositeComponentFileName,
- "${cc.attrs.}",
+ "#{cc.attrs.}",
11,
0,
getCompositeComponentsAttributeDefProposalList());
// check inserting of "submitlabel" content assist
String contentAssistToUse = "submitlabel";
contentAssist.checkContentAssist(contentAssistToUse, true);
- expectedInsertedText = "<h:commandButton action=\"${cc.attrs." +
contentAssistToUse + "}\"";
+ expectedInsertedText = "<h:commandButton action=\"#{cc.attrs." +
contentAssistToUse + "}\"";
assertTrue("Editor has to contain text '" + expectedInsertedText +
"' but it doesn't\n" +
"Editor Text is\n" + compositeComponentDefEditor.getText(),
compositeComponentDefEditor.getText().toLowerCase().contains(expectedInsertedText.toLowerCase()));
@@ -291,7 +291,7 @@
9,
0,
expectedProposals);
- // Check content assist for ${user. prefix
+ // Check content assist for #{user. prefix
expectedProposals.clear();
expectedProposals.add("name : String - User");
expectedProposals.add("sayHello() : String - User");
@@ -554,7 +554,7 @@
result.add("onmouseup");
result.add("submitlabel");
result.add("value");
- result.add("\"${cc.attrs.}\"");
+ result.add("\"#{cc.attrs.}\"");
return result;
}
Modified:
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -18,6 +18,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
public abstract class JBTSWTBotTestCase extends SWTTestExt implements
@@ -144,6 +145,10 @@
bot.viewByTitle(WidgetVariables.WELCOME).close();
} catch (WidgetNotFoundException e) {
}
+ try {
+ bot.editorByTitle(IDELabel.View.JBOSS_CENTRAL).close();
+ } catch (WidgetNotFoundException e) {
+ }
openErrorLog();
openPackageExplorer();
// openProgressStatus();
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 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -230,6 +230,7 @@
public static final String PROPERTIES = "Properties";
public static final String JBOSS_TOOLS_PALETTE = "JBoss Tools Palette";
public static final String PALETTE = "Palette";
+ public static final String JBOSS_CENTRAL = "JBoss Central";
}
public class ViewGroup {
@@ -416,6 +417,7 @@
public static final String JBOSS_EAP_5_x = "JBoss Enterprise Application
Platform 5.x Runtime";
public static final String JBOSS_AS_5_1 = "JBoss 5.1 Runtime";
public static final String JBOSS_AS_6_0 = "JBoss 6.0 Runtime";
+ public static final String JBOSS_AS_6_x = "JBoss 6.x Runtime";
}
public static final class ServerType {
@@ -424,6 +426,7 @@
public static final String JBOSS_EAP_5_0 = "JBoss Enterprise Application
Platform 5.0";
public static final String JBOSS_EAP_5_x = "JBoss Enterprise Application
Platform 5.x";
public static final String JBOSS_AS_6_0 = "JBoss 6.0 Runtime";
+ public static final String JBOSS_AS_6_x = "JBoss 6.x Runtime";
}
public static final class DroolsRuntimeDialog {
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -20,7 +20,7 @@
public enum ViewType {
PACKAGE_EXPLORER, PROJECT_EXPLORER, WELCOME, DATA_SOURCE_EXPLORER,
SERVERS,WEB_PROJECTS,PROBLEMS,DEBUG,GUVNOR_REPOSITORIES,PROPERTIES,
- GUVNOR_RESOURCE_HISTORY,JBOSS_TOOLS_PALETTE, PALETTE;
+ GUVNOR_RESOURCE_HISTORY,JBOSS_TOOLS_PALETTE, PALETTE, JBOSS_CENTRAL;
public String getGroupLabel() {
String viewLabel = "";
@@ -57,6 +57,7 @@
case GUVNOR_RESOURCE_HISTORY: viewLabel = IDELabel.View.GUVNOR_RESOURCE_HISTORY;
break;
case JBOSS_TOOLS_PALETTE: viewLabel = IDELabel.View.JBOSS_TOOLS_PALETTE; break;
case PALETTE: viewLabel = IDELabel.View.PALETTE; break;
+ case JBOSS_CENTRAL: viewLabel = IDELabel.View.JBOSS_CENTRAL; break;
default: fail("Unknown View Type");
}
return viewLabel;
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 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -96,8 +96,8 @@
"6.0");
if (version.equals("6.0")) {
JBOSS_AS_FOR_JSF2_SERVER_GROUP = IDELabel.ServerGroup.JBOSS_AS_6_0;
- JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_AS_6_0;
- JBOSS_AS_FOR_JSF2_SERVER_TYPE = IDELabel.ServerType.JBOSS_AS_6_0;
+ JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_AS_6_x;
+ JBOSS_AS_FOR_JSF2_SERVER_TYPE = IDELabel.ServerType.JBOSS_AS_6_x;
} else {
throw new RuntimeException(
"Unsupported version of JBoss AS runtime for JSF2 [version="
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -64,10 +64,9 @@
jspTextEditor.save();
botExt.sleep(Timing.time2S());
// Check if tag h:outputText was properly added
- String editorText = jspTextEditor.getText();
- assertTrue("File " + TEST_PAGE
- + " has to contain string '<h:outputText>' but it
doesn't",
- editorText.contains("<h:outputText>"));
+ String editorText = VPEEditorTestCase.stripHTMLSourceText(jspTextEditor.getText());
assertTrue("File " + TEST_PAGE
+ + " has to contain string
'<h:outputText></h:outputText>' but it doesn't",
+ editorText.contains("<h:outputText></h:outputText>"));
}
/**
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MenuItemEntity.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MenuItemEntity.java 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MenuItemEntity.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -69,7 +69,9 @@
if (label == null) {
if (other.label != null)
return false;
- } else if (!label.equals(other.label))
+ } else if (!label.equals(other.label) &&
+ (!((label.equals("Seam") && other.label.equals("Seam
2")) || // Seam = Seam 2
+ (label.equals("Seam 2") &&
other.label.equals("Seam"))))) // Seam 2 = Seam
return false;
return true;
}
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 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -86,7 +86,8 @@
* @return String
*/
protected static String stripHTMLSourceText(String editorText){
- return editorText.replaceAll("\n", "").replaceAll("\t",
"").replaceAll(" ", "");
+ return editorText.replaceAll("\n", "").replaceAll("\t",
"").replaceAll("\b", "")
+ .replaceAll(" ", "").replaceAll("\r",
"").replaceAll("\f", "");
}
/**
* Asserts if sourceEditorText of file with fileName contains textToContain
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VisualEditorContextMenuTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VisualEditorContextMenuTest.java 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VisualEditorContextMenuTest.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -383,22 +383,11 @@
for (MenuItemEntity mieThirdLevel : mieSecondLevel.getChildren()){
String thirdLevelMenuItemLabel = mieThirdLevel.getLabel();
if (thirdLevelMenuItemLabel.endsWith(" taglib") ||
- (firstLevelMenuItemLabel.equals("JBoss") &&
secondLevelMenuItemLabel.equals("Ajax4Jsf") &&
thirdLevelMenuItemLabel.equals("queue")) ||
- (firstLevelMenuItemLabel.equals("JBoss") &&
secondLevelMenuItemLabel.equals("RichFaces") &&
thirdLevelMenuItemLabel.equals("menuSeparator")) ||
(firstLevelMenuItemLabel.equals("JBoss") &&
secondLevelMenuItemLabel.equals("Seam") &&
thirdLevelMenuItemLabel.equals("convertEnum")) ||
(firstLevelMenuItemLabel.equals("JBoss") &&
secondLevelMenuItemLabel.equals("Seam") &&
thirdLevelMenuItemLabel.equals("convertDateTime")) ||
(firstLevelMenuItemLabel.equals("JBoss") &&
secondLevelMenuItemLabel.equals("Seam") &&
thirdLevelMenuItemLabel.equals("enumItem")) ||
(firstLevelMenuItemLabel.equals("JBoss") &&
secondLevelMenuItemLabel.equals("Seam") &&
thirdLevelMenuItemLabel.equals("fileUpload")) ||
- (firstLevelMenuItemLabel.equals("JBoss") &&
secondLevelMenuItemLabel.equals("Seam") &&
thirdLevelMenuItemLabel.equals("validate")) ||
- (firstLevelMenuItemLabel.equals("JSF") &&
secondLevelMenuItemLabel.equals("HTML") &&
thirdLevelMenuItemLabel.equals("commandButton")) ||
- (firstLevelMenuItemLabel.equals("JSF") &&
secondLevelMenuItemLabel.equals("HTML") &&
thirdLevelMenuItemLabel.equals("graphicImage")) ||
- (firstLevelMenuItemLabel.equals("JSF") &&
secondLevelMenuItemLabel.equals("HTML") &&
thirdLevelMenuItemLabel.equals("inputHidden")) ||
- (firstLevelMenuItemLabel.equals("JSF") &&
secondLevelMenuItemLabel.equals("HTML") &&
thirdLevelMenuItemLabel.equals("inputSecret")) ||
- (firstLevelMenuItemLabel.equals("JSF") &&
secondLevelMenuItemLabel.equals("HTML") &&
thirdLevelMenuItemLabel.equals("inputText")) ||
- (firstLevelMenuItemLabel.equals("JSF") &&
secondLevelMenuItemLabel.equals("HTML") &&
thirdLevelMenuItemLabel.equals("message")) ||
- (firstLevelMenuItemLabel.equals("JSF") &&
secondLevelMenuItemLabel.equals("HTML") &&
thirdLevelMenuItemLabel.equals("messages")) ||
- (firstLevelMenuItemLabel.equals("JSF") &&
secondLevelMenuItemLabel.equals("HTML") &&
thirdLevelMenuItemLabel.equals("outputText")) ||
- (firstLevelMenuItemLabel.equals("JSF") &&
secondLevelMenuItemLabel.equals("HTML") &&
thirdLevelMenuItemLabel.equals("selectBooleanCheckbox"))){
+ (firstLevelMenuItemLabel.equals("JBoss") &&
secondLevelMenuItemLabel.equals("Seam") &&
thirdLevelMenuItemLabel.equals("validate"))){
// Skip these Menu Items
}
else{
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 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -3,6 +3,7 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
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;
@@ -15,7 +16,8 @@
openPage();
bot.toolbarButtonWithTooltip(PREF_TOOLTIP).click();
bot.shell(PREF_FILTER_SHELL_TITLE).activate();
- bot.comboBoxWithLabel(SELECT_DEFAULT_TAB).setSelection("Source");
//$NON-NLS-1$
+ bot.comboBoxWithLabel(SELECT_DEFAULT_TAB)
+ .setSelection(IDELabel.VisualPageEditor.SOURCE_TAB_LABEL);
bot.button("OK").click(); //$NON-NLS-1$
//Create and open new page
@@ -47,14 +49,18 @@
public void tearDown() throws Exception {
//Delete test page if it has been created
+ new
SWTBotExt().swtBotEditorExtByTitle(TEST_PAGE).selectPage(IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
innerBot.tree().expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent")
//$NON-NLS-1$
.expandNode("pages").getNode("testPage.jsp").select();
//$NON-NLS-1$//$NON-NLS-2$
bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$
//$NON-NLS-2$
bot.shell("Confirm Delete").activate(); //$NON-NLS-1$
- bot.button("OK").click(); //$NON-NLS-1$
- bot.multiPageEditorByTitle(TEST_PAGE).selectTab("Visual/Source");
//$NON-NLS-1$
- super.tearDown();
+ bot.button(IDELabel.Button.OK).click(); //$NON-NLS-1$
+ bot.toolbarButtonWithTooltip(PREF_TOOLTIP).click();
+ bot.shell(PREF_FILTER_SHELL_TITLE).activate();
+
bot.comboBoxWithLabel(SELECT_DEFAULT_TAB).setSelection(IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
//$NON-NLS-1$
+ bot.button(IDELabel.Button.OK).click();
+ super.tearDown();
}
}
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java 2011-10-27
14:32:05 UTC (rev 36045)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java 2011-10-27
15:55:50 UTC (rev 36046)
@@ -89,7 +89,7 @@
private static List<String> getJspPageProposalList(){
LinkedList<String> result = new LinkedList<String>();
- result.add("New JSF EL Expression - Create a new attribute value with
${}");
+ result.add("New JSF EL Expression - Create a new attribute value with
#{}");
result.add("f:actionListener");
result.add("f:attribute");
result.add("f:convertDateTime");