JBoss Tools SVN: r38176 - in trunk/ws/tests/org.jboss.tools.ws.ui.bot.test: src/org/jboss/tools/ws/ui/bot/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-25 11:47:37 -0500 (Wed, 25 Jan 2012)
New Revision: 38176
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
Log:
WSAllBotTests edited to include the new RESTful test
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF 2012-01-25 16:46:54 UTC (rev 38175)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF 2012-01-25 16:47:37 UTC (rev 38176)
@@ -17,8 +17,8 @@
org.eclipse.ui.ide;bundle-version="3.5.1",
org.eclipse.ui.forms;bundle-version="3.4.1",
org.junit4;bundle-version="4.5.0",
+ org.eclipse.core.resources,
org.jboss.tools.ws.ui;bundle-version="1.1.0",
- org.eclipse.core.resources,
org.eclipse.wst.common.project.facet.core,
org.hamcrest;bundle-version="1.1.0"
Bundle-ActivationPolicy: lazy
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2012-01-25 16:46:54 UTC (rev 38175)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2012-01-25 16:47:37 UTC (rev 38176)
@@ -11,6 +11,7 @@
package org.jboss.tools.ws.ui.bot.test;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.jboss.tools.ws.ui.bot.test.rest.completion.RESTfulCompletionTest;
import org.jboss.tools.ws.ui.bot.test.rest.explorer.RESTfulExplorerTest;
import org.jboss.tools.ws.ui.bot.test.rest.explorer.RESTfulSupportTest;
import org.jboss.tools.ws.ui.bot.test.rest.validation.RESTfulValidationTest;
@@ -54,7 +55,8 @@
SimpleRESTWebServiceTest.class,
RESTfulSupportTest.class,
RESTfulExplorerTest.class,
-// RESTfulValidationTest.class,
+ RESTfulValidationTest.class,
+ RESTfulCompletionTest.class,
BottomUpWSTest.class,
TopDownWSTest.class,
WsClientTest.class,
13 years, 11 months
JBoss Tools SVN: r38175 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-25 11:46:54 -0500 (Wed, 25 Jan 2012)
New Revision: 38175
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java
Log:
RESTfulCompletionTest completed
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java 2012-01-25 16:45:57 UTC (rev 38174)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/completion/RESTfulCompletionTest.java 2012-01-25 16:46:54 UTC (rev 38175)
@@ -11,7 +11,12 @@
package org.jboss.tools.ws.ui.bot.test.rest.completion;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.tools.ui.bot.ext.helper.ContentAssistHelper;
import org.jboss.tools.ws.ui.bot.test.rest.RESTfulTestBase;
+import org.jboss.tools.ws.ui.bot.test.rest.explorer.RESTfulExplorerTest;
import org.junit.Test;
/**
@@ -21,6 +26,22 @@
*/
public class RESTfulCompletionTest extends RESTfulTestBase{
+ private final String SIMPLE_REST_WS_RESOURCE = "/resources/restful/SimpleRestWS.java.ws";
+
+ private final String GET_METHOD_PATH = "/{userId}";
+
+ private final String EMPTY_PATH_PARAM = "";
+
+ private final String CORRECT_PATH_PARAM = "userId";
+
+ private final String INCORRECT_PATH_PARAM = "someId";
+
+ private final String PATH_PARAM_NAVIGATION = "@PathParam(";
+
+ private final List<String> EXP_NON_EMPTY_COMPLETION_RESULT = Arrays.asList("userId - JAX-RS Mapping");
+
+ private final List<String> EXP_EMPTY_COMPLETION_RESULT = Arrays.asList("No Default Proposals");
+
protected String getWsProjectName() {
return "RestServicesCompletion";
}
@@ -48,31 +69,81 @@
@Test
public void testWithEmptyPrefix() {
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
+ false, getWsPackage(), getWsName(), GET_METHOD_PATH, EMPTY_PATH_PARAM);
+
+ ContentAssistHelper.checkContentAssistContent(bot,
+ getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() + 1,
+ 0, EXP_NON_EMPTY_COMPLETION_RESULT);
+
}
@Test
public void testWithValidPrefixAtTheEnd() {
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
+ false, getWsPackage(), getWsName(), GET_METHOD_PATH, CORRECT_PATH_PARAM);
+
+ ContentAssistHelper.checkContentAssistContent(bot,
+ getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() +
+ CORRECT_PATH_PARAM.length() + 1,
+ 0, EXP_NON_EMPTY_COMPLETION_RESULT);
+
}
@Test
public void testWithValidPrefixInTheBeginning() {
+
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
+ false, getWsPackage(), getWsName(), GET_METHOD_PATH, CORRECT_PATH_PARAM);
+ ContentAssistHelper.checkContentAssistContent(bot,
+ getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() + 1,
+ 0, EXP_NON_EMPTY_COMPLETION_RESULT);
+
}
@Test
public void testWithInvalidPrefixAtTheEnd() {
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
+ false, getWsPackage(), getWsName(), GET_METHOD_PATH, INCORRECT_PATH_PARAM);
+
+ ContentAssistHelper.checkContentAssistContent(bot,
+ getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() +
+ INCORRECT_PATH_PARAM.length() + 1,
+ 0, EXP_EMPTY_COMPLETION_RESULT);
+
}
-
+
@Test
public void testWithInvalidPrefixInTheBeginning() {
+
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
+ false, getWsPackage(), getWsName(), GET_METHOD_PATH, INCORRECT_PATH_PARAM);
+ ContentAssistHelper.checkContentAssistContent(bot,
+ getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() + 1,
+ 0, EXP_NON_EMPTY_COMPLETION_RESULT);
+
}
@Test
public void testWithAllInvalidParamSelection() {
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
+ false, getWsPackage(), getWsName(), GET_METHOD_PATH, INCORRECT_PATH_PARAM);
+
+ ContentAssistHelper.checkContentAssistContent(bot,
+ getWsName() + ".java", PATH_PARAM_NAVIGATION, PATH_PARAM_NAVIGATION.length() + 1,
+ INCORRECT_PATH_PARAM.length(), EXP_NON_EMPTY_COMPLETION_RESULT);
+
}
}
13 years, 11 months
JBoss Tools SVN: r38174 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-25 11:45:57 -0500 (Wed, 25 Jan 2012)
New Revision: 38174
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java
Log:
RESTfulValidationTest edited to use merged resource file
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java 2012-01-25 16:44:33 UTC (rev 38173)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/rest/validation/RESTfulValidationTest.java 2012-01-25 16:45:57 UTC (rev 38174)
@@ -25,6 +25,7 @@
private final String GET_METHOD_PATH = "/{id}";
private final String CORRECT_PATH_PARAM = "id";
private final String BAD_PATH_PARAM = "customerId";
+ private final String SIMPLE_REST_WS_RESOURCE = "/resources/restful/SimpleRestWS.java.ws";
protected String getWsProjectName() {
return "RestServicesValidation";
@@ -54,8 +55,7 @@
public void testCorrectValueValidation() {
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/CorrectRestWS.java.ws"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
false, getWsPackage(), getWsName(), GET_METHOD_PATH, CORRECT_PATH_PARAM);
assertTrue(getRESTValidationErrors(getWsProjectName()).length == 0);
@@ -63,9 +63,9 @@
@Test
public void testBadValueValidation() {
+
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/BadRestWS.java.ws"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
false, getWsPackage(), getWsName(), GET_METHOD_PATH, BAD_PATH_PARAM);
assertTrue("" + getRESTValidationErrors(getWsProjectName()).length,
@@ -74,14 +74,13 @@
@Test
public void testCorrectToBadValueValidation() {
+
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/CorrectRestWS.java.ws"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
false, getWsPackage(), getWsName(), GET_METHOD_PATH, CORRECT_PATH_PARAM);
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/BadRestWS.java.ws"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
false, getWsPackage(), getWsName(), GET_METHOD_PATH, BAD_PATH_PARAM);
assertTrue("" + getRESTValidationErrors(getWsProjectName()).length,
@@ -91,13 +90,11 @@
@Test
public void testBadToCorrectValueValidation() {
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/BadRestWS.java.ws"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
false, getWsPackage(), getWsName(), GET_METHOD_PATH, BAD_PATH_PARAM);
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/CorrectRestWS.java.ws"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
false, getWsPackage(), getWsName(), GET_METHOD_PATH, CORRECT_PATH_PARAM);
assertTrue("" + getRESTValidationErrors(getWsProjectName()).length,
@@ -110,8 +107,7 @@
disableRESTValidation();
resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
- RESTfulExplorerTest.class.
- getResourceAsStream("/resources/restful/BadRestWS.java.ws"),
+ RESTfulExplorerTest.class.getResourceAsStream(SIMPLE_REST_WS_RESOURCE),
false, getWsPackage(), getWsName(), GET_METHOD_PATH, BAD_PATH_PARAM);
assertTrue("" + getRESTValidationErrors(getWsProjectName()).length,
13 years, 11 months
JBoss Tools SVN: r38173 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-25 11:44:33 -0500 (Wed, 25 Jan 2012)
New Revision: 38173
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/SimpleRestWS.java.ws
Removed:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/BadRestWS.java.ws
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/CorrectRestWS.java.ws
Log:
Two resource files merged into one
Deleted: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/BadRestWS.java.ws
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/BadRestWS.java.ws 2012-01-25 16:29:14 UTC (rev 38172)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/BadRestWS.java.ws 2012-01-25 16:44:33 UTC (rev 38173)
@@ -1,17 +0,0 @@
-package {0};
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-
-
-@Path("/rest")
-public class {1} '{'
-
- @GET
- @Path("{2}")
- public String getMessage(@PathParam("{3}") int id) '{'
- return null;
- '}'
-
-'}'
Deleted: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/CorrectRestWS.java.ws
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/CorrectRestWS.java.ws 2012-01-25 16:29:14 UTC (rev 38172)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/CorrectRestWS.java.ws 2012-01-25 16:44:33 UTC (rev 38173)
@@ -1,17 +0,0 @@
-package {0};
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-
-
-@Path("/rest")
-public class {1} '{'
-
- @GET
- @Path("{2}")
- public String getMessage(@PathParam("{3}") int id) '{'
- return null;
- '}'
-
-'}'
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/SimpleRestWS.java.ws
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/SimpleRestWS.java.ws (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/restful/SimpleRestWS.java.ws 2012-01-25 16:44:33 UTC (rev 38173)
@@ -0,0 +1,17 @@
+package {0};
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+
+
+@Path("/rest")
+public class {1} '{'
+
+ @GET
+ @Path("{2}")
+ public String getMessage(@PathParam("{3}") int id) '{'
+ return null;
+ '}'
+
+'}'
13 years, 11 months
JBoss Tools SVN: r38172 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-01-25 11:29:14 -0500 (Wed, 25 Jan 2012)
New Revision: 38172
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/
Log:
ignoring resources
Property changes on: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test
___________________________________________________________________
Modified: svn:ignore
- build
bin
target
buildlog.latest.txt
+ build
bin
target
buildlog.latest.txt
db
screenshots
13 years, 11 months
JBoss Tools SVN: r38171 - trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke.
by jbosstools-commits@lists.jboss.org
Author: jgargula
Date: 2012-01-25 10:45:07 -0500 (Wed, 25 Jan 2012)
New Revision: 38171
Modified:
trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java
Log:
Added test of Audit view
Modified: trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java
===================================================================
--- trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java 2012-01-25 15:43:20 UTC (rev 38170)
+++ trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java 2012-01-25 15:45:07 UTC (rev 38171)
@@ -15,10 +15,10 @@
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.gen.IView;
+import org.jboss.tools.ui.bot.ext.helper.DragAndDropHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
/**
@@ -36,6 +36,7 @@
private static final String SAMPLE_TREE_NODE = "com.sample";
private static final String GLOBAL_VARIABLE_NAME = "globalString";
private static final String GLOBAL_VARIABLE_VALUE = "abcd";
+ private static final String LOG_FILE = "test.log";
private static boolean isFirstTimeRun = true;
/**
@@ -44,17 +45,17 @@
@Before
public void setUp() {
if (isFirstTimeRun) {
+ eclipse.closeAllEditors();
manageProject();
setUpOnce();
}
SWTBotTreeItem javaTreeItem = packageExplorer.selectTreeItem(JAVA_FILE, new String[] {PROJECT_NAME, JAVA_FILE_PATH, SAMPLE_TREE_NODE});
eclipse.debugTreeItemAsDroolsApplication(javaTreeItem);
- while (bot.waitForShell(IDELabel.Shell.PROGRESS_INFORMATION, 1) != null) {
- // nothing to do, waiting time is included in waitForShell method
+ while (bot.waitForShell(IDELabel.Shell.PROGRESS_INFORMATION, 0) != null) {
+ bot.sleep(Timing.time2S());
}
if (isFirstTimeRun) {
- bot.waitForShell(IDELabel.Shell.CONFIRM_PERSPECTIVE_SWITCH).activate();
eclipse.closeConfirmPerspectiveSwitchShellIfOpened(false, true);
}
@@ -136,7 +137,6 @@
/**
* Tests refreshing of Agenda view.
*/
- @Ignore
@Test
public void refreshAgendaTest() {
openView(IDELabel.View.AGENDA);
@@ -158,6 +158,26 @@
}
/**
+ * Test of Audit view.
+ */
+ @Test
+ public void auditTest() {
+ eclipse.finishDebug();
+ openView(IDELabel.View.AUDIT);
+ SWTBotView auditView = bot.viewByTitle(IDELabel.View.AUDIT);
+ assertEquals("Tree in Audit view should be empty, but it has " + auditView.bot().tree().getAllItems().length
+ + " items.", 0, auditView.bot().tree().getAllItems().length);
+ packageExplorer.selectTreeItem(PROJECT_NAME, null).contextMenu(IDELabel.Menu.REFRESH).click();
+ assertTrue("Log file '" + LOG_FILE + "' was not created.", packageExplorer.existsResource(PROJECT_NAME, LOG_FILE));
+ SWTBotTreeItem treeItem = packageExplorer.selectTreeItem(LOG_FILE, new String[] {PROJECT_NAME});
+ DragAndDropHelper.dragAndDropOnTo(treeItem.widget, auditView.getWidget());
+ assertTrue("Tree in Audit view should not be empty, but it was.", auditView.bot().tree().getAllItems().length > 0);
+ assertFalse("Log file '" + LOG_FILE + "' was not loaded properly into Audit view.",
+ "The selected audit log is empty.".equals(auditView.bot().tree().getAllItems()[0].getText()));
+ fail("Error with Audit was probably resolved. This should be completed now.");
+ }
+
+ /**
* Adds some pieces of code to DroolsTest.java
*/
private void adjustDroolsTestFile() {
13 years, 11 months
JBoss Tools SVN: r38170 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: jgargula
Date: 2012-01-25 10:43:20 -0500 (Wed, 25 Jan 2012)
New Revision: 38170
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java
Log:
Added method which return all checkBoxes
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java 2012-01-25 14:55:19 UTC (rev 38169)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java 2012-01-25 15:43:20 UTC (rev 38170)
@@ -12,13 +12,17 @@
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.allOf;
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withStyle;
import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withText;
import static org.junit.Assert.fail;
+import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Scale;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
@@ -26,12 +30,14 @@
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.forms.widgets.Section;
+import org.hamcrest.Matcher;
import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
import org.jboss.tools.ui.bot.ext.parts.SWTBotHyperlinkExt;
@@ -240,4 +246,23 @@
return null;
}
+
+ /**
+ * Returns current displayed checkboxes.
+ * There are included disabled checkboxes as well
+ * therefore it is necessary to check their states before use of them.
+ *
+ * @return List of current displayed checkboxes.
+ */
+ @SuppressWarnings({"unchecked", "rawtypes"})
+ public List<SWTBotCheckBox> checkBoxes() {
+ List<SWTBotCheckBox> checkBoxes = new ArrayList<SWTBotCheckBox>();
+ Matcher matcher = allOf(widgetOfType(Button.class), withStyle(SWT.CHECK, "SWT.CHECK"));
+ for (Object widget : widgets(matcher)) {
+ if (widget != null) {
+ checkBoxes.add(new SWTBotCheckBox((Button) widget));
+ }
+ }
+ return checkBoxes;
+ }
}
13 years, 11 months
JBoss Tools SVN: r38169 - trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-01-25 09:55:19 -0500 (Wed, 25 Jan 2012)
New Revision: 38169
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java
Log:
https://issues.jboss.org/browse/JBIDE-10706 : BrowserSim: compilation error in WebKitTests.java
Modified: trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java 2012-01-25 14:22:42 UTC (rev 38168)
+++ trunk/vpe/tests/org.jboss.tools.vpe.browsersim.browser.test/src/org/jboss/tools/vpe/browsersim/browser/test/WebKitTests.java 2012-01-25 14:55:19 UTC (rev 38169)
@@ -36,7 +36,7 @@
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
- final AbstractWebKitBrowser webKitBrowser = WebKitBrowserFactory.createWebKitBrowser(shell, SWT.NONE);
+ final AbstractWebKitBrowser webKitBrowser = new WebKitBrowserFactory().createBrowser(shell, SWT.NONE);
assertNotNull(webKitBrowser);
ExpressionsEvaluator expressionsEvaluator = new ExpressionsEvaluator(webKitBrowser);
13 years, 11 months
JBoss Tools SVN: r38168 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-01-25 09:22:42 -0500 (Wed, 25 Jan 2012)
New Revision: 38168
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeValue.java
Log:
https://issues.jboss.org/browse/JBIDE-8651 :
Revert workaround for wrong implementation of WTP's ElementImpl.getAttribute(String)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeValue.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeValue.java 2012-01-25 11:23:33 UTC (rev 38167)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeValue.java 2012-01-25 14:22:42 UTC (rev 38168)
@@ -29,13 +29,6 @@
}
public VpeValue(String value) {
- /* yradtsevich: workaround for JBIDE-8649: WTP ElementImpl
- * may return null for getAttribute method.
- */
- if (value == null) {
- value = ""; //$NON-NLS-1$
- }
-
stringValue = value;
type = STRING_VALUE;
}
13 years, 11 months
JBoss Tools SVN: r38167 - trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/cnf.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-01-25 06:23:33 -0500 (Wed, 25 Jan 2012)
New Revision: 38167
Modified:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/cnf/UriMappingsContentProvider.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/cnf/UriMappingsLabelProvider.java
Log:
Trying to fix a refresh issue: saving quickly the web.xml does not *always* end up with JAX-RS nodes labels being updated in the Project explorer view...
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/cnf/UriMappingsContentProvider.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/cnf/UriMappingsContentProvider.java 2012-01-25 11:09:37 UTC (rev 38166)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/cnf/UriMappingsContentProvider.java 2012-01-25 11:23:33 UTC (rev 38167)
@@ -158,8 +158,8 @@
public void run() {
if (viewer != null) {
TreePath[] treePaths = viewer.getExpandedTreePaths();
- Logger.debug("*** Refreshing the viewer... ***");
- viewer.refresh(target, true);
+ Logger.debug("*** Refreshing the viewer at target level: {} (viewer busy: {}) ***", target, viewer.isBusy());
+ viewer.refresh(target);
viewer.setExpandedTreePaths(treePaths);
Logger.debug("*** Refreshing the viewer... done ***");
} else {
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/cnf/UriMappingsLabelProvider.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/cnf/UriMappingsLabelProvider.java 2012-01-25 11:09:37 UTC (rev 38166)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.ui/src/org/jboss/tools/ws/jaxrs/ui/cnf/UriMappingsLabelProvider.java 2012-01-25 11:23:33 UTC (rev 38167)
@@ -22,6 +22,7 @@
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsEndpoint;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsResourceMethod;
import org.jboss.tools.ws.jaxrs.ui.JBossJaxrsUIPlugin;
+import org.jboss.tools.ws.jaxrs.ui.internal.utils.Logger;
/** @author xcoulon */
public class UriMappingsLabelProvider implements IStyledLabelProvider, ILabelProvider {
@@ -125,6 +126,7 @@
sb.append(uriTemplate);
StyledString styledString = new StyledString(sb.toString());
styledString.setStyle(0, httpVerb.length(), StyledString.QUALIFIER_STYLER);
+ Logger.debug("URI Path Template: {}", styledString.getString());
return styledString;
}
13 years, 11 months