JBoss Tools SVN: r30582 - in trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el: internal/core/parser and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-14 17:47:40 -0400 (Thu, 14 Apr 2011)
New Revision: 30582
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
Log:
JBIDE-8728
https://issues.jboss.org/browse/JBIDE-8728
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java 2011-04-14 21:41:11 UTC (rev 30581)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/LexicalToken.java 2011-04-14 21:47:40 UTC (rev 30582)
@@ -100,6 +100,10 @@
return type;
}
+ public void setType(int type) {
+ this.type = type;
+ }
+
/*
* Returns the token text
*/
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2011-04-14 21:41:11 UTC (rev 30581)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2011-04-14 21:47:40 UTC (rev 30582)
@@ -180,6 +180,16 @@
setNextToken();
return expr;
case JavaNameTokenDescription.JAVA_NAME:
+ LexicalToken t = lookUpNextToken(current);
+ if(t != null && t.getType() == OperationTokenDescription.OPERATION && t.getText().equals(":")) { //$NON-NLS-1$
+ LexicalToken t1 = lookUpNextToken(t);
+ if(t1 != null && t1.getType() == JavaNameTokenDescription.JAVA_NAME) {
+ LexicalToken t2 = lookUpNextToken(t1);
+ if(t2 != null && t2.getType() == ParamStartTokenDescription.PARAM_START) {
+ t.setType(DotTokenDescription.DOT);
+ }
+ }
+ }
return readInvocationExpression();
}
return null;
13 years, 7 months
JBoss Tools SVN: r30581 - trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-14 17:41:11 -0400 (Thu, 14 Apr 2011)
New Revision: 30581
Modified:
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java
Log:
JBIDE-8728
https://issues.jboss.org/browse/JBIDE-8728
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java 2011-04-14 21:34:07 UTC (rev 30580)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java 2011-04-14 21:41:11 UTC (rev 30581)
@@ -119,7 +119,6 @@
Set<String> keys = new HashSet<String>();
for (ELInvocationExpression i: is) {
String key = i.toString();
- System.out.println(key);
keys.add(key);
}
assertTrue(keys.contains("e1"));
13 years, 7 months
JBoss Tools SVN: r30580 - trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-14 17:34:07 -0400 (Thu, 14 Apr 2011)
New Revision: 30580
Modified:
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java
Log:
JBIDE-8728
https://issues.jboss.org/browse/JBIDE-8728
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java 2011-04-14 17:29:25 UTC (rev 30579)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELModelTest.java 2011-04-14 21:34:07 UTC (rev 30580)
@@ -10,10 +10,13 @@
******************************************************************************/
package org.jboss.tools.common.el.core.test;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.model.ELInstance;
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
import org.jboss.tools.common.el.core.model.ELMethodInvocation;
import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.core.model.ELMultiExpression;
@@ -101,4 +104,32 @@
}
+ public void testTagLibraryFunctionInvocation() {
+ ELParser parser = ELParserUtil.getJbossFactory().createParser();
+ String el = "#{e1 ? e2 : e3:f3() + (a:b(1,true) + c).d()}";
+ ELModel model = parser.parse(el);
+
+ List<ELInstance> instances = model.getInstances();
+
+ assertEquals(1, instances.size());
+
+ ELInstance instance = instances.get(0);
+ ELExpression expr = instance.getExpression();
+ List<ELInvocationExpression> is = expr.getInvocations();
+ Set<String> keys = new HashSet<String>();
+ for (ELInvocationExpression i: is) {
+ String key = i.toString();
+ System.out.println(key);
+ keys.add(key);
+ }
+ assertTrue(keys.contains("e1"));
+ assertTrue(keys.contains("e2"));
+ assertTrue(keys.contains("e3:f3()"));
+ assertTrue(keys.contains("a:b(1,true)"));
+ assertTrue(keys.contains("c"));
+ assertTrue(keys.contains(".d()"));
+ assertEquals(6, is.size());
+
+ }
+
}
13 years, 7 months
JBoss Tools SVN: r30579 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-14 13:29:25 -0400 (Thu, 14 Apr 2011)
New Revision: 30579
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeployerTestUtils.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/TypedDeployerIntegrationTest.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java
Log:
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java 2011-04-14 15:50:49 UTC (rev 30578)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java 2011-04-14 17:29:25 UTC (rev 30579)
@@ -36,17 +36,17 @@
public class TypedDeployer {
private static final long TIMEOUT = 15 * 1000;
-
+
public static void undeploy(String name, String host, int port) throws DeployerException {
ModelControllerClient client = null;
try {
client = ModelControllerClient.Factory.create(host, port);
ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client);
InitialDeploymentPlanBuilder builder = manager.newDeploymentPlan();
-
+
DeploymentPlan plan = builder.undeploy(name).andRemoveUndeployed().build();
manager.execute(plan).get(TIMEOUT, TimeUnit.MILLISECONDS);
- } catch(Exception e) {
+ } catch (Exception e) {
throw new DeployerException(e);
} finally {
StreamUtils.safeClose(client);
@@ -54,16 +54,19 @@
}
public static void deploy(File file, String host, int port) throws DeployerException {
+ deploy(file.getName(), file, host, port);
+ }
+
+ public static void deploy(String name, File file, String host, int port) throws DeployerException {
ModelControllerClient client = null;
try {
client = ModelControllerClient.Factory.create(host, port);
ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client);
InitialDeploymentPlanBuilder builder = manager.newDeploymentPlan();
- String name = file.getName();
DeploymentPlan plan = builder.add(name, file).deploy(name).build();
manager.execute(plan).get(TIMEOUT, TimeUnit.MILLISECONDS);
- } catch(Exception e) {
+ } catch (Exception e) {
throw new DeployerException(e);
} finally {
StreamUtils.safeClose(client);
@@ -71,16 +74,19 @@
}
public static void replace(File file, String host, int port) throws DeployerException {
+ replace(file.getName(), file, host, port);
+ }
+
+ public static void replace(String name, File file, String host, int port) throws DeployerException {
ModelControllerClient client = null;
try {
client = ModelControllerClient.Factory.create(host, port);
ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client);
InitialDeploymentPlanBuilder builder = manager.newDeploymentPlan();
- String name = file.getName();
- DeploymentPlan plan = builder.replace(name, file).deploy(name).build();
+ DeploymentPlan plan = builder.replace(name, file).build();
manager.execute(plan).get(TIMEOUT, TimeUnit.MILLISECONDS);
- } catch(Exception e) {
+ } catch (Exception e) {
throw new DeployerException(e);
} finally {
StreamUtils.safeClose(client);
@@ -88,25 +94,30 @@
}
//
-// public static boolean isDeployed(String name, String host, int port) throws CancellationException, IOException {
-// ModelControllerClient client = ModelControllerClient.Factory.create(host, port);
-// try {
-// return Util.isDeployed(name, client);
-// } finally {
-// StreamUtils.safeClose(client);
-// }
-// }
-//
-// public static List<String> getDeployments(String host, int port) throws UnknownHostException {
-// ModelControllerClient client = ModelControllerClient.Factory.create(host, port);
-// return Util.getDeployments(client);
-// }
-//
-// private static void throwOnFailure(ModelNode result) throws DeployerException {
-// if (!Util.isSuccess(result)) {
-// throw new DeployerException(Util.getFailureDescription(result));
-// }
-// }
+ // public static boolean isDeployed(String name, String host, int port)
+ // throws CancellationException, IOException {
+ // ModelControllerClient client = ModelControllerClient.Factory.create(host,
+ // port);
+ // try {
+ // return Util.isDeployed(name, client);
+ // } finally {
+ // StreamUtils.safeClose(client);
+ // }
+ // }
+ //
+ // public static List<String> getDeployments(String host, int port) throws
+ // UnknownHostException {
+ // ModelControllerClient client = ModelControllerClient.Factory.create(host,
+ // port);
+ // return Util.getDeployments(client);
+ // }
+ //
+ // private static void throwOnFailure(ModelNode result) throws
+ // DeployerException {
+ // if (!Util.isSuccess(result)) {
+ // throw new DeployerException(Util.getFailureDescription(result));
+ // }
+ // }
private TypedDeployer() {
// inhibit instantiation
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java 2011-04-14 15:50:49 UTC (rev 30578)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java 2011-04-14 17:29:25 UTC (rev 30579)
@@ -50,13 +50,14 @@
request.get("operation").set("undeploy");
request.get("address").add("deployment", name);
ModelNode result = client.execute(request);
+ throwOnFailure(result);
// remove
request = new ModelNode();
request.get("operation").set("remove");
request.get("address").add("deployment", name);
result = client.execute(request);
- } catch(Exception e) {
+ } catch (Exception e) {
throw new DeployerException(e);
} finally {
StreamUtils.safeClose(client);
@@ -64,10 +65,13 @@
}
public static void deploy(File file, String host, int port) throws DeployerException {
+ deploy(file.getName(), file, host, port);
+ }
+
+ public static void deploy(String name, File file, String host, int port) throws DeployerException {
ModelControllerClient client = null;
try {
client = ModelControllerClient.Factory.create(host, port);
- String name = file.getName();
ModelNode request = new ModelNode();
request.get("operation").set("add");
@@ -82,18 +86,17 @@
ModelNode result = client.execute(operation);
throwOnFailure(result);
- } catch(Exception e) {
+ } catch (Exception e) {
throw new DeployerException(e);
} finally {
StreamUtils.safeClose(client);
}
}
- public static void replace(File file, String host, int port) throws DeployerException {
+ public static void replace(String name, File file, String host, int port) throws DeployerException {
ModelControllerClient client = null;
try {
client = ModelControllerClient.Factory.create(host, port);
- String name = file.getName();
ModelNode request = new ModelNode();
request.get("operation").set("full-replace-deployment");
@@ -107,13 +110,13 @@
ModelNode result = client.execute(operation);
throwOnFailure(result);
- } catch(Exception e) {
+ } catch (Exception e) {
throw new DeployerException(e);
} finally {
StreamUtils.safeClose(client);
}
}
-
+
public static boolean isDeployed(String name, String host, int port) throws CancellationException, IOException {
ModelControllerClient client = ModelControllerClient.Factory.create(host, port);
try {
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeployerTestUtils.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeployerTestUtils.java 2011-04-14 15:50:49 UTC (rev 30578)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeployerTestUtils.java 2011-04-14 17:29:25 UTC (rev 30579)
@@ -29,6 +29,7 @@
import java.net.HttpURLConnection;
import java.net.URISyntaxException;
import java.net.URL;
+import java.text.MessageFormat;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
@@ -39,11 +40,17 @@
*/
public class DeployerTestUtils {
+ public static final String GWT_HELLOWORLD_WAR = "gwt-helloworld.war";
+ public static final String MINIMALISTIC_WAR = "minimalistic.war";
+
+ public static final String HOST = "localhost";
+ public static final int MGMT_PORT = 9999;
+ public static final int WEB_PORT = 8080;
+
private static final String WAR_FOLDER = "/wars/";
private static final String BUNDLE_ID = "org.jboss.ide.eclipse.as7.deployment.tests";
private static final int WEBAPP_RESPONSE_TIMEOUT = 10 * 1024;
-
public static File getWarFile(String name) throws URISyntaxException, IOException {
Bundle bundle = Platform.getBundle(BUNDLE_ID);
@@ -51,7 +58,13 @@
return new File(FileLocator.resolve(entryUrl).toURI());
}
- public static String getServerResponse(URL url) throws IOException {
+ public static String getWebappResponse(String name, String host, int port) throws IOException {
+ return getServerResponse(new URL(
+ MessageFormat.format(
+ "http://{0}:{1}/{2}", host, String.valueOf(port), name)));
+ }
+
+ public static String getServerResponse(URL url) throws IOException {
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setUseCaches(false);
connection.setDoInput(true);
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java 2011-04-14 15:50:49 UTC (rev 30578)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java 2011-04-14 17:29:25 UTC (rev 30579)
@@ -27,12 +27,11 @@
import static org.junit.Assert.assertTrue;
import java.io.File;
-import java.net.URL;
-import java.text.MessageFormat;
import java.util.List;
import org.jboss.ide.eclipse.as7.deployment.detyped.DeployerException;
import org.jboss.ide.eclipse.as7.deployment.detyped.DetypedDeployer;
+import org.jboss.ide.eclipse.as7.deployment.internal.TypedDeployer;
import org.junit.Test;
/**
@@ -40,22 +39,13 @@
*/
public class DetypedDeployerIntegrationTest {
- private static final String GWT_HELLOWORLD_WAR = "gwt-helloworld.war";
- private static final String MINIMALISTIC_WAR = "minimalistic.war";
-
- private static final String HOST = "localhost";
- private static final int MGMT_PORT = 9999;
- private static final int WEB_PORT = 8080;
-
@Test
public void canDeploy() throws Exception {
- File warFile = DeployerTestUtils.getWarFile(MINIMALISTIC_WAR);
+ File warFile = DeployerTestUtils.getWarFile(DeployerTestUtils.MINIMALISTIC_WAR);
try {
- DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
+ DetypedDeployer.deploy(warFile, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
- String response = DeployerTestUtils.getServerResponse(new URL(
- MessageFormat.format(
- "http://{0}:{1}/{2}", HOST, String.valueOf(WEB_PORT), "minimalistic")));
+ String response = DeployerTestUtils.getWebappResponse("minimalistic", DeployerTestUtils.HOST, DeployerTestUtils.WEB_PORT);
assertTrue(response.indexOf("minimalistic") >= 0);
} finally {
@@ -65,36 +55,46 @@
@Test(expected = DeployerException.class)
public void cannotDeployWarTwice() throws Exception {
- File warFile = DeployerTestUtils.getWarFile(MINIMALISTIC_WAR);
+ File warFile = DeployerTestUtils.getWarFile(DeployerTestUtils.MINIMALISTIC_WAR);
try {
- DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
- DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
+ DetypedDeployer.deploy(warFile, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ DetypedDeployer.deploy(warFile, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
} finally {
quietlyUndeploy(warFile);
}
}
@Test
- public void canRedeployWar() throws Exception {
- File warFile = DeployerTestUtils.getWarFile(MINIMALISTIC_WAR);
+ public void canReplaceWar() throws Exception {
+ File warFile = DeployerTestUtils.getWarFile(DeployerTestUtils.MINIMALISTIC_WAR);
+ File warFile2 = DeployerTestUtils.getWarFile(DeployerTestUtils.GWT_HELLOWORLD_WAR);
+ String name = warFile.getName();
try {
- DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
- DetypedDeployer.replace(warFile, HOST, MGMT_PORT);
+ DetypedDeployer.deploy(name, warFile, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ DetypedDeployer.replace(name, warFile2, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ String response = DeployerTestUtils.getWebappResponse(
+ "minimalistic", DeployerTestUtils.HOST, DeployerTestUtils.WEB_PORT);
+ assertTrue(response.indexOf("GWT") >= 0);
} finally {
quietlyUndeploy(warFile);
}
}
+ @Test(expected = DeployerException.class)
+ public void cannotUndeployNondeployed() throws DeployerException {
+ DetypedDeployer.undeploy("inexistant", DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ }
+
@Test
public void canQueryDeploymentdeployedState() throws Exception {
- File warFile = DeployerTestUtils.getWarFile(MINIMALISTIC_WAR);
- File warFile2 = DeployerTestUtils.getWarFile(GWT_HELLOWORLD_WAR);
+ File warFile = DeployerTestUtils.getWarFile(DeployerTestUtils.MINIMALISTIC_WAR);
+ File warFile2 = DeployerTestUtils.getWarFile(DeployerTestUtils.GWT_HELLOWORLD_WAR);
try {
- DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
- DetypedDeployer.deploy(warFile2, HOST, MGMT_PORT);
- List<String> deployments = DetypedDeployer.getDeployments(HOST, MGMT_PORT);
+ DetypedDeployer.deploy(warFile, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ DetypedDeployer.deploy(warFile2, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ List<String> deployments = DetypedDeployer.getDeployments(DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
assertThat(deployments.size(), is(2));
- assertThat(deployments, hasItems( MINIMALISTIC_WAR, GWT_HELLOWORLD_WAR));
+ assertThat(deployments, hasItems(DeployerTestUtils.MINIMALISTIC_WAR, DeployerTestUtils.GWT_HELLOWORLD_WAR));
} finally {
quietlyUndeploy(warFile);
quietlyUndeploy(warFile2);
@@ -103,7 +103,7 @@
private void quietlyUndeploy(File file) {
try {
- DetypedDeployer.undeploy(file.getName(), HOST, MGMT_PORT);
+ DetypedDeployer.undeploy(file.getName(), DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
} catch (Exception e) {
e.printStackTrace();
// ignore
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/TypedDeployerIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/TypedDeployerIntegrationTest.java 2011-04-14 15:50:49 UTC (rev 30578)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/TypedDeployerIntegrationTest.java 2011-04-14 17:29:25 UTC (rev 30579)
@@ -24,9 +24,8 @@
import static org.junit.Assert.assertTrue;
import java.io.File;
-import java.net.URL;
-import java.text.MessageFormat;
+import org.jboss.ide.eclipse.as7.deployment.internal.DeployerException;
import org.jboss.ide.eclipse.as7.deployment.internal.TypedDeployer;
import org.junit.Test;
@@ -36,23 +35,14 @@
*/
public class TypedDeployerIntegrationTest {
- private static final String GWT_HELLOWORLD_WAR = "gwt-helloworld.war";
- private static final String MINIMALISTIC_WAR = "minimalistic.war";
- private static final String WAR_FOLDER = "/wars/";
-
- private static final String HOST = "localhost";
- private static final int MGMT_PORT = 9999;
- private static final int WEB_PORT = 8080;
-
@Test
public void canDeploy() throws Exception {
- File warFile = DeployerTestUtils.getWarFile(MINIMALISTIC_WAR);
+ File warFile = DeployerTestUtils.getWarFile(DeployerTestUtils.MINIMALISTIC_WAR);
try {
- TypedDeployer.deploy(warFile, HOST, MGMT_PORT);
+ TypedDeployer.deploy(warFile, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
- String response = DeployerTestUtils.getServerResponse(new URL(
- MessageFormat.format(
- "http://{0}:{1}/{2}", HOST, String.valueOf(WEB_PORT), "minimalistic")));
+ String response = DeployerTestUtils.getWebappResponse(
+ "minimalistic", DeployerTestUtils.HOST, DeployerTestUtils.WEB_PORT);
assertTrue(response.indexOf("minimalistic") >= 0);
} finally {
@@ -60,61 +50,85 @@
}
}
-// @Test(expected = Exception.class)
-// public void cannotDeployWarTwice() throws Exception {
-// File warFile = getWarFile(MINIMALISTIC_WAR);
-// try {
-// DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
-// DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
-// } finally {
-// quietlyUndeploy(warFile);
-// }
-// }
-//
-// @Test
-// public void canQueryDeploymentdeployedState() throws Exception {
-// File warFile = getWarFile(MINIMALISTIC_WAR);
-// File warFile2 = getWarFile(GWT_HELLOWORLD_WAR);
-// try {
-// DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
-// DetypedDeployer.deploy(warFile2, HOST, MGMT_PORT);
-// List<String> deployments = DetypedDeployer.getDeployments(HOST, MGMT_PORT);
-// assertThat(deployments.size(), is(2));
-// assertThat(deployments, hasItems( MINIMALISTIC_WAR, GWT_HELLOWORLD_WAR));
-// } finally {
-// quietlyUndeploy(warFile);
-// }
-// }
-//
-// private File getWarFile(String name) throws URISyntaxException, IOException {
-// Bundle bundle = Platform.getBundle(BUNDLE_ID);
-// URL entryUrl = bundle.getEntry(WAR_FOLDER + name);
-// return new File(FileLocator.resolve(entryUrl).toURI());
-// }
-//
-// private String getServerResponse(URL url) throws IOException {
-// HttpURLConnection connection = (HttpURLConnection) url.openConnection();
-// connection.setUseCaches(false);
-// connection.setDoInput(true);
-// connection.setAllowUserInteraction(false);
-// connection.setConnectTimeout(WEBAPP_RESPONSE_TIMEOUT);
-// connection.setInstanceFollowRedirects(true);
-// connection.setDoOutput(false);
-// BufferedInputStream in = new BufferedInputStream(connection.getInputStream());
-// return toString(in);
-// }
-//
-// private String toString(InputStream in) throws IOException {
-// StringWriter writer = new StringWriter();
-// for (int data = -1; ((data = in.read()) != -1);) {
-// writer.write(data);
-// }
-// return writer.toString();
-// }
-//
+ @Test(expected = DeployerException.class)
+ public void cannotDeployWarTwice() throws Exception {
+ File warFile = DeployerTestUtils.getWarFile(DeployerTestUtils.MINIMALISTIC_WAR);
+ try {
+ TypedDeployer.deploy(warFile, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ TypedDeployer.deploy(warFile, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ } finally {
+ quietlyUndeploy(warFile);
+ }
+ }
+
+ @Test(expected = DeployerException.class)
+ public void cannotUndeployNondeployed() throws DeployerException {
+ TypedDeployer.undeploy("inexistant", DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ }
+
+ @Test
+ public void canReplaceyWar() throws Exception {
+ File warFile = DeployerTestUtils.getWarFile(DeployerTestUtils.MINIMALISTIC_WAR);
+ File warFile2 = DeployerTestUtils.getWarFile(DeployerTestUtils.GWT_HELLOWORLD_WAR);
+ String name = warFile.getName();
+ try {
+ TypedDeployer.deploy(name, warFile, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ TypedDeployer.replace(name, warFile2, DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
+ String response = DeployerTestUtils.getWebappResponse(
+ "minimalistic", DeployerTestUtils.HOST, DeployerTestUtils.WEB_PORT);
+ assertTrue(response.indexOf("GWT") >= 0);
+ } finally {
+ quietlyUndeploy(warFile);
+ }
+ }
+
+ // @Test
+ // public void canQueryDeploymentdeployedState() throws Exception {
+ // File warFile = getWarFile(MINIMALISTIC_WAR);
+ // File warFile2 = getWarFile(GWT_HELLOWORLD_WAR);
+ // try {
+ // DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
+ // DetypedDeployer.deploy(warFile2, HOST, MGMT_PORT);
+ // List<String> deployments = DetypedDeployer.getDeployments(HOST,
+ // MGMT_PORT);
+ // assertThat(deployments.size(), is(2));
+ // assertThat(deployments, hasItems( MINIMALISTIC_WAR, GWT_HELLOWORLD_WAR));
+ // } finally {
+ // quietlyUndeploy(warFile);
+ // }
+ // }
+ //
+ // private File getWarFile(String name) throws URISyntaxException,
+ // IOException {
+ // Bundle bundle = Platform.getBundle(BUNDLE_ID);
+ // URL entryUrl = bundle.getEntry(WAR_FOLDER + name);
+ // return new File(FileLocator.resolve(entryUrl).toURI());
+ // }
+ //
+ // private String getServerResponse(URL url) throws IOException {
+ // HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ // connection.setUseCaches(false);
+ // connection.setDoInput(true);
+ // connection.setAllowUserInteraction(false);
+ // connection.setConnectTimeout(WEBAPP_RESPONSE_TIMEOUT);
+ // connection.setInstanceFollowRedirects(true);
+ // connection.setDoOutput(false);
+ // BufferedInputStream in = new
+ // BufferedInputStream(connection.getInputStream());
+ // return toString(in);
+ // }
+ //
+ // private String toString(InputStream in) throws IOException {
+ // StringWriter writer = new StringWriter();
+ // for (int data = -1; ((data = in.read()) != -1);) {
+ // writer.write(data);
+ // }
+ // return writer.toString();
+ // }
+ //
private void quietlyUndeploy(File file) {
try {
- TypedDeployer.undeploy(file.getName(), HOST, MGMT_PORT);
+ TypedDeployer.undeploy(file.getName(), DeployerTestUtils.HOST, DeployerTestUtils.MGMT_PORT);
} catch (Exception e) {
e.printStackTrace();
// ignore
13 years, 7 months
JBoss Tools SVN: r30578 - trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-04-14 11:50:49 -0400 (Thu, 14 Apr 2011)
New Revision: 30578
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TestPageType.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandLinkTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/HtmlCommandLinkTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/IncludeTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java
Log:
Tag Tests Refactoring
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AbstractTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -11,6 +11,8 @@
******************************************************************************/
package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+import java.security.InvalidParameterException;
+
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
@@ -23,13 +25,12 @@
*/
public abstract class AbstractTagTest extends VPEEditorTestCase {
- protected static final String TEST_PAGE_NAME_JSP = "TagTest.jsp";
- protected static final String TEST_PAGE_NAME_XHTML = "TagTest.xhtml";
+ private static final String TEST_PAGE_NAME_JSP = "TagTest.jsp";
+ private static final String TEST_PAGE_NAME_XHTML = "TagTest.xhtml";
- protected SWTBotEditorExt jspEditor;
- protected SWTBotEditorExt xhtmlEditor;
- protected SWTBotWebBrowser jspWebBrowser;
- protected SWTBotWebBrowser xhtmlWebBrowser;
+ private SWTBotEditorExt sourceEditor;
+ private SWTBotWebBrowser visualEditor;
+ private TestPageType testPageType;
protected SWTBotExt botExt;
public AbstractTagTest() {
@@ -40,15 +41,29 @@
protected void setUp() throws Exception {
super.setUp();
eclipse.maximizeActiveShell();
- createJspPage(AbstractTagTest.TEST_PAGE_NAME_JSP);
- jspEditor = botExt.swtBotEditorExtByTitle(AbstractTagTest.TEST_PAGE_NAME_JSP);
- jspWebBrowser = new SWTBotWebBrowser(AbstractTagTest.TEST_PAGE_NAME_JSP,botExt);
- createXhtmlPage(AbstractTagTest.TEST_PAGE_NAME_XHTML);
- xhtmlEditor = botExt.swtBotEditorExtByTitle(AbstractTagTest.TEST_PAGE_NAME_XHTML);
- xhtmlWebBrowser = new SWTBotWebBrowser(AbstractTagTest.TEST_PAGE_NAME_XHTML,botExt);
-
+ initTestPage ();
+ savePage();
}
-
+ /**
+ *
+ * @param testPageType
+ * @param pageText
+ */
+ protected void initTestPage(TestPageType testPageType , String pageText){
+ this.testPageType = testPageType;
+ if (testPageType.equals(TestPageType.JSP)){
+ createJspPage(AbstractTagTest.TEST_PAGE_NAME_JSP);
+ sourceEditor = botExt.swtBotEditorExtByTitle(AbstractTagTest.TEST_PAGE_NAME_JSP);
+ visualEditor = new SWTBotWebBrowser(AbstractTagTest.TEST_PAGE_NAME_JSP,botExt);
+ } else if (testPageType.equals(TestPageType.XHTML)){
+ createXhtmlPage(AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ sourceEditor = botExt.swtBotEditorExtByTitle(AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ visualEditor = new SWTBotWebBrowser(AbstractTagTest.TEST_PAGE_NAME_XHTML,botExt);
+ } else {
+ throw new InvalidParameterException("Invalid value of testPageType used: " + testPageType);
+ }
+ sourceEditor.setText(pageText);
+ }
@Override
protected void closeUnuseDialogs() {
@@ -60,43 +75,67 @@
}
@Override
protected void tearDown() throws Exception {
- jspEditor.close();
- xhtmlEditor.close();
+ sourceEditor.close();
super.tearDown();
}
/**
* Runs Tag Testing
*/
public void testTag (){
- initPageContent ();
- savePageContent ();
verifyTag();
}
/**
- * Initialize proper page content
+ * Initialize properly page content
*/
- protected abstract void initPageContent ();
+ protected abstract void initTestPage ();
/**
* Verify tag
*/
protected abstract void verifyTag ();
/**
- * Saves Page Content if it was changed and shows changed editor
+ * Saves Page if it was changed and shows changed editor
*/
- protected void savePageContent(){
+ protected void savePage(){
boolean wasSaved = false;
- if (jspEditor.isDirty()){
- jspEditor.save();
- jspEditor.show();
+ if (sourceEditor.isDirty()){
+ sourceEditor.save();
+ sourceEditor.show();
wasSaved = true;
}
- if (xhtmlEditor.isDirty()){
- xhtmlEditor.save();
- xhtmlEditor.show();
- wasSaved = true;
- }
if (wasSaved){
bot.sleep(Timing.time3S());
}
}
+ /**
+ * Returns actual Source part of VPE Editor
+ * @return
+ */
+ protected SWTBotEditorExt getSourceEditor() {
+ return sourceEditor;
+ }
+ /**
+ * Returns actual Visual part of VPE Editor
+ * @return
+ */
+ protected SWTBotWebBrowser getVisualEditor() {
+ return visualEditor;
+ }
+ /**
+ * Returns actual Test Page File Name
+ * @return
+ */
+ protected String getTestPageFileName() {
+ String fileName = null;
+
+ if (testPageType.equals(TestPageType.JSP)){
+ fileName = AbstractTagTest.TEST_PAGE_NAME_JSP;
+ } else if (testPageType.equals(TestPageType.XHTML)){
+ fileName = AbstractTagTest.TEST_PAGE_NAME_XHTML;
+ } else{
+ throw new InvalidParameterException("Invalid value of testPageType used: " + testPageType);
+ }
+
+ return fileName;
+ }
+
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ActionParamTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
*/
public class ActionParamTagTest extends AbstractTagTest{
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
" xmlns:a4j=\"http://richfaces.org/a4j\"\n" +
@@ -43,9 +44,9 @@
@Override
protected void verifyTag() {
// check tag selection
- xhtmlEditor.selectLine(10);
+ getSourceEditor().selectLine(10);
bot.sleep(Timing.time3S());
- nsIDOMNode selectedVisualNode=xhtmlWebBrowser.getSelectedDomNode();
+ nsIDOMNode selectedVisualNode=getVisualEditor().getSelectedDomNode();
assertNotNull("Selected node in Visual Editor cannot be null",selectedVisualNode);
String expectedSelectedNode = "DIV";
assertTrue("Selected Node has to be '" + expectedSelectedNode + "' node but is " + selectedVisualNode.getLocalName(),
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxInvisibleTagsTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
private static final String SUPPORT_VALUE = "*! Support Value";
private static final String STATUS_VALUE = "*! Status Value";
@Override
- protected void initPageContent() {
- jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.JSP,
+ "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
@@ -48,38 +49,38 @@
// check Problems View for Errors
assertProbelmsViewNoErrors(botExt);
// check values which should not be displayed in Visual Editor
- assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
+ assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
AjaxInvisibleTagsTest.JS_FUNCTION_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
AjaxInvisibleTagsTest.QUEUE_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
AjaxInvisibleTagsTest.KEEP_ALIVE_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
AjaxInvisibleTagsTest.SUPPORT_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
AjaxInvisibleTagsTest.STATUS_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
+ getTestPageFileName());
// check empty Visual Editor
- assertVisualEditorContainsManyNodes(jspWebBrowser,
+ assertVisualEditorContainsManyNodes(getVisualEditor(),
"TABLE",
1,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContainsManyNodes(jspWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsManyNodes(getVisualEditor(),
"TR",
1,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContainsManyNodes(jspWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsManyNodes(getVisualEditor(),
"TD",
1,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContainsManyNodes(jspWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsManyNodes(getVisualEditor(),
"DIV",
4,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
+ getTestPageFileName());
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/AjaxValidatorTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
public class AjaxValidatorTagTest extends AbstractTagTest{
private static final String INPUT_TEXT = "!*- Input Text";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
" xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -45,9 +46,9 @@
@Override
protected void verifyTag() {
// check tag selection
- xhtmlEditor.selectLine(11);
+ getSourceEditor().selectLine(11);
bot.sleep(Timing.time3S());
- nsIDOMNode selectedVisualNode=xhtmlWebBrowser.getSelectedDomNode();
+ nsIDOMNode selectedVisualNode=getVisualEditor().getSelectedDomNode();
assertNotNull("Selected node in Visual Editor cannot be null",selectedVisualNode);
String expectedSelectedNode = "SPAN";
assertTrue("Selected Node has to be '" + expectedSelectedNode + "' node but is " + selectedVisualNode.getLocalName(),
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/BeanValidatorTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
public class BeanValidatorTagTest extends AbstractTagTest{
private static final String INPUT_TEXT = "!*- Input Text";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
" xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -44,9 +45,9 @@
@Override
protected void verifyTag() {
// check tag selection
- xhtmlEditor.selectLine(10);
+ getSourceEditor().selectLine(10);
bot.sleep(Timing.time3S());
- nsIDOMNode selectedVisualNode=xhtmlWebBrowser.getSelectedDomNode();
+ nsIDOMNode selectedVisualNode=getVisualEditor().getSelectedDomNode();
assertNotNull("Selected node in Visual Editor cannot be null",selectedVisualNode);
String expectedSelectedNode = "SPAN";
assertTrue("Selected Node has to be '" + expectedSelectedNode + "' node but is " + selectedVisualNode.getLocalName(),
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CalendarTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,12 +20,13 @@
*/
public class CalendarTagTest extends AbstractTagTest{
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
- " xmlns:rich=\"http://richfaces.org/rich\"\n" +
+ " xmlns:rich=\"http://richfaces.org/rich\">\n" +
" <head>\n" +
" </head>\n" +
" <body>\n" +
@@ -39,15 +40,15 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"INPUT",
new String[]{"class"},
new String[]{"rich-calendar-input null"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("INPUT",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("INPUT",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:calendar>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnGroupTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -24,8 +24,9 @@
private static final String CELL_1_0_VALUE = "!-* Cell 1x0 Value";
private static final String CELL_1_1_VALUE = "!-* Cell 1x1 Value";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
" xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -55,37 +56,37 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class","rowspan"},
new String[]{"dr-table-cell rich-table-cell dr-subtable-cell","2"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class","colspan"},
new String[]{"dr-table-cell rich-table-cell dr-subtable-cell","2"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class","breakbefore"},
new String[]{"dr-table-cell rich-table-cell dr-subtable-cell","true"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ColumnGroupTagTest.SPAN_COLUMN_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ColumnGroupTagTest.SPAN_ROW__VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ColumnGroupTagTest.CELL_1_0_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ColumnGroupTagTest.CELL_1_1_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TBODY",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TBODY",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:columnGroup>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
private static final String COLUMN_HEADER_VALUE = "!-*Column Header Value";
private static final String COLUMN_VALUE = "!-*Column Value";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -48,36 +49,36 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-subheader rich-table-subheader"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-table-subheadercell rich-table-subheadercell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-firstrow rich-table-firstrow"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-table-cell rich-table-cell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ColumnTagTest.COLUMN_HEADER_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ColumnTagTest.COLUMN_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TD",2), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TD",2), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:column>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ColumnsTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
private static final String columnValue = "Column Value";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:h=\"http://java.sun.com/jsf/html\"\n" +
@@ -50,32 +51,32 @@
@Override
protected void verifyTag() {
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- columnHeader,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- columnValue,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ columnHeader,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ columnValue,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-subheader rich-table-subheader"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "TD",
- new String[]{"class"},
- new String[]{"dr-table-subheadercell rich-table-subheadercell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "TR",
- new String[]{"class"},
- new String[]{"dr-table-firstrow rich-table-firstrow"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "TD",
- new String[]{"class"},
- new String[]{"dr-table-cell rich-table-cell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "TD",
+ new String[]{"class"},
+ new String[]{"dr-table-subheadercell rich-table-subheadercell"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "TR",
+ new String[]{"class"},
+ new String[]{"dr-table-firstrow rich-table-firstrow"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "TD",
+ new String[]{"class"},
+ new String[]{"dr-table-cell rich-table-cell"},
+ getTestPageFileName());
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ComboBoxTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
private static final String defaultLabel = "DefaultLabel";
@Override
- protected void initPageContent() {
- jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.JSP,
+ "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
"<html>\n" +
@@ -44,30 +45,30 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(jspWebBrowser,
- "INPUT",
- new String[]{"type","class","value"},
- new String[]{"text","rich-combobox-font-disabled rich-combobox-input-inactive",defaultLabel},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
- "INPUT",
- new String[]{"type","class"},
- new String[]{"text","rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
- "INPUT",
- new String[]{"type","class"},
- new String[]{"text","rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
- "DIV",
- new String[]{"class"},
- new String[]{"rich-combobox-strut rich-combobox-font"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
+ assertVisualEditorContains(getVisualEditor(),
+ "INPUT",
+ new String[]{"type","class","value"},
+ new String[]{"text","rich-combobox-font-disabled rich-combobox-input-inactive",defaultLabel},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "INPUT",
+ new String[]{"type","class"},
+ new String[]{"text","rich-combobox-font-inactive rich-combobox-button-background rich-combobox-button-inactive"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "INPUT",
+ new String[]{"type","class"},
+ new String[]{"text","rich-combobox-font-inactive rich-combobox-button-icon-inactive rich-combobox-button-inactive"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[]{"class"},
+ new String[]{"rich-combobox-strut rich-combobox-font"},
+ getTestPageFileName());
// check tag selection
- jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("INPUT"), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("INPUT"), 0);
bot.sleep(Timing.time3S());
- String selectedText = jspEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
final String hasToStartWith = "<rich:comboBox";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandButtonTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
*/
public class CommandButtonTagTest extends AbstractTagTest{
@Override
- protected void initPageContent() {
- jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.JSP,
+ "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
@@ -39,15 +40,15 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(jspWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"INPUT",
new String[]{"type"},
new String[]{"Submit"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
+ getTestPageFileName());
// check tag selection
- jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("INPUT",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("INPUT",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = jspEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<a4j:commandButton type=\"Submit\">";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandLinkTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandLinkTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/CommandLinkTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
public class CommandLinkTagTest extends AbstractTagTest{
private static final String LINK_VALUE = "*! Link Value";
@Override
- protected void initPageContent() {
- jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.JSP,
+ "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
@@ -43,23 +44,23 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(jspWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"INPUT",
new String[]{"type"},
new String[]{"Submit"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"A",
null,
null,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContainsNodeWithValue(jspWebBrowser,
- CommandLinkTagTest.LINK_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ CommandLinkTagTest.LINK_VALUE,
+ getTestPageFileName());
// check tag selection
- jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("A",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("A",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = jspEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<a4j:commandLink";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataDefinitionTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
private static String testText = "test_text";
private static int numRows = 3;
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -45,27 +46,27 @@
@Override
protected void verifyTag() {
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataDefinitionTagTest.testText,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsManyNodes(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsManyNodes(getVisualEditor(),
"DD",
DataDefinitionTagTest.numRows,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"DL",
new String[]{"class"},
new String[]{"listClass"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"DD",
new String[]{"class"},
new String[]{"columnClass"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DD",2), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DD",2), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:dataDefinitionList ";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataGridTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -26,8 +26,9 @@
private static final String GRID_COLUMNS = "3";
private static final String GRID_ELEMENTS = "6";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -54,71 +55,71 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"TABLE",
new String[]{"class","columns","elements"},
new String[]{"dr-table rich-table",DataGridTagTest.GRID_COLUMNS,DataGridTagTest.GRID_ELEMENTS},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"THEAD",
null,
null,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TFOOT",
null,
null,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-header rich-table-header"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-table-headercell rich-table-headercell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-footer rich-table-footer"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-table-footercell rich-table-footercell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-row rich-table-row"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-table-cell rich-table-cell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsManyNodes(xhtmlWebBrowser,
- "SPAN",
- 2 + (2 * Integer.parseInt(DataGridTagTest.GRID_ELEMENTS)),
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsManyNodes(getVisualEditor(),
+ "SPAN",
+ 2 + (2 * Integer.parseInt(DataGridTagTest.GRID_ELEMENTS)),
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataGridTagTest.HEADER_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataGridTagTest.FOOTER_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- DataGridTagTest.CELL_0_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- DataGridTagTest.CELL_1_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ DataGridTagTest.CELL_0_VALUE,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ DataGridTagTest.CELL_1_VALUE,
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("THEAD",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("THEAD",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:dataGrid";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataListTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
private static final String ROW_1_VALUE = "!-* Row 1 Value";
private static final String ROW_2_VALUE = "!-* Row 2 Value";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
" xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -47,29 +48,29 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"UL",
new String[]{"class"},
new String[]{"dr-list rich-datalist"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"LI",
new String[]{"class"},
new String[]{"dr-list-item rich-list-item"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataListTagTest.ROW_0_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataListTagTest.ROW_1_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataListTagTest.ROW_2_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selecti
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("LI",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("LI",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:dataList>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataOrderedListTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
private static final String ROW_1_VALUE = "!-* Row 1 Value";
private static final String ROW_2_VALUE = "!-* Row 2 Value";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
" xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -47,29 +48,29 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"OL",
new String[]{"class"},
new String[]{"dr-list rich-orderedlist"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"LI",
new String[]{"class"},
new String[]{"dr-list-item rich-list-item"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataOrderedListTagTest.ROW_0_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataOrderedListTagTest.ROW_1_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataOrderedListTagTest.ROW_2_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selecti
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("LI",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("LI",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:dataOrderedList>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataScrollerTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
public class DataScrollerTagTest extends AbstractTagTest{
private static final String DATA_SCROLLER_STYLE = "background-color: red;";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -41,30 +42,30 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"DIV",
new String[]{"class","style"},
new String[]{"rich-datascr",DataScrollerTagTest.DATA_SCROLLER_STYLE},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"rich-datascr-button rich-datascr-button-dsbld"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"rich-datascr-act"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"rich-datascr-inact"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:datascroller style=\"" + DataScrollerTagTest.DATA_SCROLLER_STYLE + "\"";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/DataTableTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -24,8 +24,9 @@
private static final String COLUMN_0_VALUE = "!-*Column 0 Value";
private static final String COLUMN_1_VALUE = "!-*Column 1 Value";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -54,57 +55,57 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"TABLE",
new String[]{"class"},
new String[]{"dr-table rich-table"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-header rich-table-header"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-table-headercell rich-table-headercell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-subheader rich-table-subheader"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-table-subheadercell rich-table-subheadercell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-firstrow rich-table-firstrow"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-table-cell rich-table-cell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataTableTagTest.TABLE_HEADER_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataTableTagTest.COLUMN_HEADER_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataTableTagTest.COLUMN_0_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
DataTableTagTest.COLUMN_1_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("THEAD",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("THEAD",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:dataTable>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/EditorTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
*/
public class EditorTagTest extends AbstractTagTest{
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -40,15 +41,15 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"DIV",
new String[]{"class"},
new String[]{"mceIframeContainer"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:editor ";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ExtendedDataTableTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -24,8 +24,9 @@
private static final String COL_0_LABEL = "!-* Col 0 Label";
private static final String COL_1_LABEL = "!-* Col 1 Label";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
" xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -55,52 +56,52 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-subheader rich-table-subheader"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TH",
new String[]{"class"},
new String[]{"dr-table-subheadercell rich-table-subheadercell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-table-subfooter rich-table-subfooter"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-table-subfootercell rich-table-subfootercell dr-table-subfooter rich-table-subfooter"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TR",
new String[]{"class"},
new String[]{"dr-body-table-tr"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-table-cell rich-table-cell"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ExtendedDataTableTagTest.COL_0_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ExtendedDataTableTagTest.COL_1_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ExtendedDataTableTagTest.COL_0_LABEL,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ExtendedDataTableTagTest.COL_1_LABEL,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selecti
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TABLE",1), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TABLE",1), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:extendedDataTable>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/FileUploadTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
*/
public class FileUploadTagTest extends AbstractTagTest{
@Override
- protected void initPageContent() {
- jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.JSP,
+ "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
"<html>\n" +
@@ -41,53 +42,53 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(jspWebBrowser,
- "B",
- new String[]{"title"},
- new String[]{"rich:fileUpload fileUploadListener: maxFilesQuantity: 1 id: upload immediateUpload: false acceptedTypes: jpg style: width:500; height:500"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
- "DIV",
- new String[]{"class"},
- new String[]{"rich-fileupload-list-decor"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
- "DIV",
- new String[]{"class"},
- new String[]{"rich-fileupload-button-border"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
- "DIV",
- new String[]{"class"},
- new String[]{"rich-fileupload-button rich-fileupload-font"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
- "DIV",
- new String[]{"class"},
- new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-add"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
- "DIV",
- new String[]{"class"},
- new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-start"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
- "DIV",
- new String[]{"class"},
- new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-clear"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
+ assertVisualEditorContains(getVisualEditor(),
+ "B",
+ new String[]{"title"},
+ new String[]{"rich:fileUpload fileUploadListener: maxFilesQuantity: 1 id: upload immediateUpload: false acceptedTypes: jpg style: width:500; height:500"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[]{"class"},
+ new String[]{"rich-fileupload-list-decor"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[]{"class"},
+ new String[]{"rich-fileupload-button-border"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[]{"class"},
+ new String[]{"rich-fileupload-button rich-fileupload-font"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[]{"class"},
+ new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-add"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[]{"class"},
+ new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-start"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[]{"class"},
+ new String[]{"rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-clear"},
+ getTestPageFileName());
// check tag selection
- jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("B",0), 0);
- bot.sleep(Timing.time3S());
- String selectedText = jspEditor.getSelection();
- final String hasToStartWith = "<rich:fileUpload";
- assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().startsWith(hasToStartWith));
- final String hasEndWith = "</rich:fileUpload>";
- assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().endsWith(hasEndWith));
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("B",0), 0);
+ bot.sleep(Timing.time3S());
+ String selectedText = getSourceEditor().getSelection();
+ final String hasToStartWith = "<rich:fileUpload";
+ assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ final String hasEndWith = "</rich:fileUpload>";
+ assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/HtmlCommandLinkTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/HtmlCommandLinkTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/HtmlCommandLinkTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
public class HtmlCommandLinkTagTest extends AbstractTagTest{
private static final String LINK_VALUE = "*! Html Link Value";
@Override
- protected void initPageContent() {
- jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.JSP,
+ "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
@@ -43,23 +44,23 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(jspWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"INPUT",
new String[]{"type"},
new String[]{"Submit"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"A",
null,
null,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContainsNodeWithValue(jspWebBrowser,
- HtmlCommandLinkTagTest.LINK_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ HtmlCommandLinkTagTest.LINK_VALUE,
+ getTestPageFileName());
// check tag selection
- jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("A",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("A",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = jspEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<a4j:htmlCommandLink";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/IncludeTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/IncludeTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/IncludeTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,7 +21,7 @@
public class IncludeTagTest extends AbstractTagTest{
private static final String INCLUDE_PAGE_NAME = "IncludePage.jsp";
@Override
- protected void initPageContent() {
+ protected void initTestPage() {
// Create pge which will be included
createJspPage(IncludeTagTest.INCLUDE_PAGE_NAME);
SWTBotEditorExt includeEditor = botExt.swtBotEditorExtByTitle(IncludeTagTest.INCLUDE_PAGE_NAME);
@@ -30,7 +30,8 @@
"</a4j:commandButton>\n");
includeEditor.saveAndClose();
- jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ initTestPage(TestPageType.JSP,
+ "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/a4j\" prefix=\"a4j\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
@@ -47,20 +48,20 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(jspWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"INPUT",
new String[]{"type"},
new String[]{"Submit"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"DIV",
new String[] {"vpe:include-element"},
new String[] {"yes"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
+ getTestPageFileName());
// check tag selection
- jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("INPUT",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("INPUT",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = jspEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<a4j:include";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceInputTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
public class InplaceInputTagTest extends AbstractTagTest{
private static final String defaultLabel = "DefaultLabel";
@Override
- protected void initPageContent() {
- jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.JSP,
+ "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
"<html>\n" +
@@ -38,39 +39,39 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(jspWebBrowser,
- "SPAN",
- new String[]{"vpe-user-toggle-id","title","class"},
- new String[]{"false","rich:inplaceInput defaultLabel: " + defaultLabel,"rich-inplace rich-inplace-view"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContainsNodeWithValue(jspWebBrowser,
- defaultLabel,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- // check tag selection
- jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("SPAN",2), 0);
- bot.sleep(Timing.time3S());
- String selectedText = jspEditor.getSelection();
- final String expectedSelectedText = "<rich:inplaceInput defaultLabel=\"" + defaultLabel+ "\"/>";
- assertTrue("Selected text in Source Pane has to be '" + expectedSelectedText + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().equals(expectedSelectedText));
- jspWebBrowser.mouseClickOnNode(jspWebBrowser.getDomNodeByTagName("SPAN",2));
- bot.sleep(Timing.time3S());
- selectedText = jspEditor.getSelection();
- assertVisualEditorContains(jspWebBrowser,
- "SPAN",
- new String[]{"vpe-user-toggle-id","class"},
- new String[]{"true","rich-inplace rich-inplace-edit"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContains(jspWebBrowser,
- "INPUT",
- new String[]{"type","class","value"},
- new String[]{"text","rich-inplace-field",defaultLabel},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertTrue("Selected text in Source Pane has to be '" + expectedSelectedText + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().equals(expectedSelectedText));
-
+ assertVisualEditorContains(getVisualEditor(),
+ "SPAN",
+ new String[]{"vpe-user-toggle-id","title","class"},
+ new String[]{"false","rich:inplaceInput defaultLabel: " + defaultLabel,"rich-inplace rich-inplace-view"},
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ defaultLabel,
+ getTestPageFileName());
+ // check tag selection
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("SPAN",2), 0);
+ bot.sleep(Timing.time3S());
+ String selectedText = getSourceEditor().getSelection();
+ final String expectedSelectedText = "<rich:inplaceInput defaultLabel=\"" + defaultLabel+ "\"/>";
+ assertTrue("Selected text in Source Pane has to be '" + expectedSelectedText + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().equals(expectedSelectedText));
+ getVisualEditor().mouseClickOnNode(getVisualEditor().getDomNodeByTagName("SPAN",2));
+ bot.sleep(Timing.time3S());
+ selectedText = getSourceEditor().getSelection();
+ assertVisualEditorContains(getVisualEditor(),
+ "SPAN",
+ new String[]{"vpe-user-toggle-id","class"},
+ new String[]{"true","rich-inplace rich-inplace-edit"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "INPUT",
+ new String[]{"type","class","value"},
+ new String[]{"text","rich-inplace-field",defaultLabel},
+ getTestPageFileName());
+ assertTrue("Selected text in Source Pane has to be '" + expectedSelectedText + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().equals(expectedSelectedText));
+
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/InplaceSelectInputTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
private static final String option1 = "Option 1";
private static final String option2 = "Option 2";
@Override
- protected void initPageContent() {
- jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.JSP,
+ "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
"<html>\n" +
@@ -43,51 +44,51 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(jspWebBrowser,
- "SPAN",
- new String[]{"vpe-user-toggle-id","title","class"},
- new String[]{"false","rich:inplaceSelect value: 0 defaultLabel: " + defaultLabel,"rich-inplace-select rich-inplace-select-view"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContainsNodeWithValue(jspWebBrowser,
- defaultLabel,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- // check tag selection
- jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("SPAN",2), 0);
- bot.sleep(Timing.time3S());
- String selectedText = jspEditor.getSelection();
- final String hasToStartWith = "<rich:inplaceSelect value=\"0\" defaultLabel=\"" + defaultLabel + "\">";
- assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().startsWith(hasToStartWith));
- final String hasEndWith = "</rich:inplaceSelect>";
- assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().endsWith(hasEndWith));
- // Click on tag and check correct tag displaying
- jspWebBrowser.mouseClickOnNode(jspWebBrowser.getDomNodeByTagName("SPAN",2));
- bot.sleep(Timing.time3S());
- assertVisualEditorContains(jspWebBrowser,
- "SPAN",
- new String[]{"vpe-user-toggle-id","class"},
- new String[]{"true","rich-inplace-select rich-inplace-select-edit"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContainsNodeWithValue(jspWebBrowser,
- option1,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorContainsNodeWithValue(jspWebBrowser,
- option2,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- assertVisualEditorNotContainNodeWithValue(jspWebBrowser,
- defaultLabel,
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- selectedText = jspEditor.getSelection();
- // check tag selection
- assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().startsWith(hasToStartWith));
- assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().endsWith(hasEndWith));
+ assertVisualEditorContains(getVisualEditor(),
+ "SPAN",
+ new String[]{"vpe-user-toggle-id","title","class"},
+ new String[]{"false","rich:inplaceSelect value: 0 defaultLabel: " + defaultLabel,"rich-inplace-select rich-inplace-select-view"},
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ defaultLabel,
+ getTestPageFileName());
+ // check tag selection
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("SPAN",2), 0);
+ bot.sleep(Timing.time3S());
+ String selectedText = getSourceEditor().getSelection();
+ final String hasToStartWith = "<rich:inplaceSelect value=\"0\" defaultLabel=\"" + defaultLabel + "\">";
+ assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ final String hasEndWith = "</rich:inplaceSelect>";
+ assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
+ // Click on tag and check correct tag displaying
+ getVisualEditor().mouseClickOnNode(getVisualEditor().getDomNodeByTagName("SPAN",2));
+ bot.sleep(Timing.time3S());
+ assertVisualEditorContains(getVisualEditor(),
+ "SPAN",
+ new String[]{"vpe-user-toggle-id","class"},
+ new String[]{"true","rich-inplace-select rich-inplace-select-edit"},
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ option1,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ option2,
+ getTestPageFileName());
+ assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
+ defaultLabel,
+ getTestPageFileName());
+ selectedText = getSourceEditor().getSelection();
+ // check tag selection
+ assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ListShuttleTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
*/
public class ListShuttleTagTest extends AbstractTagTest{
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -40,70 +41,61 @@
@Override
protected void verifyTag() {
- assertVisualEditorContainsNodeWithValue(
- xhtmlWebBrowser,
- "Copy all",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(
- xhtmlWebBrowser,
- "Copy",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(
- xhtmlWebBrowser,
- "Remove All",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(
- xhtmlWebBrowser,
- "Remove",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(
- xhtmlWebBrowser,
- "First",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(
- xhtmlWebBrowser,
- "Up",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(
- xhtmlWebBrowser,
- "Last",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(
- xhtmlWebBrowser,
- "Down",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "DIV",
- new String[]{"class"},
- new String[]{"rich-shuttle-button-content"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "TABLE",
- new String[]{"class"},
- new String[]{"rich-list-shuttle"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "DIV",
- new String[]{"class"},
- new String[]{"rich-shuttle-controls"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "DIV",
- new String[]{"class"},
- new String[]{"rich-shuttle-control"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- // check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
- bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
- String hasToStartWith = "<rich:listShuttle>";
- assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().startsWith(hasToStartWith));
- String hasEndWith = "</rich:listShuttle>";
- assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().endsWith(hasEndWith));
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Copy all",
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Copy",
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Remove All",
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Remove",
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "First",
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Up",
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Last",
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Down",
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[] { "class" },
+ new String[] { "rich-shuttle-button-content" },
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "TABLE",
+ new String[] { "class" },
+ new String[] { "rich-list-shuttle" },
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[] { "class" },
+ new String[] { "rich-shuttle-controls" },
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[] { "class" },
+ new String[] { "rich-shuttle-control" },
+ getTestPageFileName());
+ // check tag selection
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV", 4), 0);
+ bot.sleep(Timing.time3S());
+ String selectedText = getSourceEditor().getSelection();
+ String hasToStartWith = "<rich:listShuttle>";
+ assertTrue("Selected text in Source Pane has to start with '"
+ + hasToStartWith + "'" + "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ String hasEndWith = "</rich:listShuttle>";
+ assertTrue("Selected text in Source Pane has to end with '" + hasEndWith
+ + "'" + "\nbut it is '" + selectedText + "'", selectedText.trim().endsWith(hasEndWith));
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelMenuTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -61,8 +61,9 @@
}
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:h=\"http://java.sun.com/jsf/html\"\n" +
@@ -100,85 +101,85 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"rich-pmenu-top-group-self-label"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"TABLE",
new String[]{"class"},
new String[]{"dr-pmenu-top-group rich-pmenu-group"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
PanelMenuTagTest.getGroupLabel(0),
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
PanelMenuTagTest.getGroupLabel(1),
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
PanelMenuTagTest.getGroupLabel(2),
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorNotContainNodeWithValue(xhtmlWebBrowser,
- PanelMenuTagTest.getGroupItemLabel(0, 0),
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
+ assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
+ PanelMenuTagTest.getGroupItemLabel(0, 0),
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:panelMenu ";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().startsWith(hasToStartWith));
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
String hasToEndWith = "</rich:panelMenu>";
assertTrue("Selected text in Source Pane has to end with '" + hasToEndWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().endsWith(hasToEndWith));
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasToEndWith));
// select and expand second group
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",6), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",6), 0);
bot.sleep(Timing.time1S());
- xhtmlWebBrowser.mouseClickOnNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",6));
+ getVisualEditor().mouseClickOnNode(getVisualEditor().getDomNodeByTagName("DIV",6));
bot.sleep(Timing.time3S());
- selectedText = xhtmlEditor.getSelection();
+ selectedText = getSourceEditor().getSelection();
hasToStartWith = "<rich:panelMenuGroup label=\"" + PanelMenuTagTest.getGroupLabel(1);
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().startsWith(hasToStartWith));
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
hasToEndWith = "</rich:panelMenuGroup>";
assertTrue("Selected text in Source Pane has to end with '" + hasToEndWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().endsWith(hasToEndWith));
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasToEndWith));
// select and expand subgroup
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",8), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",8), 0);
bot.sleep(Timing.time1S());
- xhtmlWebBrowser.mouseClickOnNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",8));
+ getVisualEditor().mouseClickOnNode(getVisualEditor().getDomNodeByTagName("DIV",8));
bot.sleep(Timing.time3S());
// select subgroup item
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",9), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",9), 0);
bot.sleep(Timing.time3S());
bot.sleep(Timing.time3S());
- selectedText = xhtmlEditor.getSelection();
+ selectedText = getSourceEditor().getSelection();
hasToStartWith = "<rich:panelMenuItem label=\"" + PanelMenuTagTest.getSubGroupItemLabel(1, 0, 0) + "\"";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().startsWith(hasToStartWith));
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
hasToEndWith = "</rich:panelMenuItem>";
assertTrue("Selected text in Source Pane has to end with '" + hasToEndWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().endsWith(hasToEndWith));
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- PanelMenuTagTest.getSubGroupItemLabel(1, 0, 0),
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "TD",
- new String[]{"class"},
- new String[]{"rich-pmenu-item-label"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasToEndWith));
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ PanelMenuTagTest.getSubGroupItemLabel(1, 0, 0),
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "TD",
+ new String[]{"class"},
+ new String[]{"rich-pmenu-item-label"},
+ getTestPageFileName());
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PanelTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
private static final String HEADER_VALUE = "!-*Header Value";
private static final String BODY_VALUE = "!-*Body Value";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -46,26 +47,26 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"DIV",
new String[]{"class"},
new String[]{"dr-pnl rich-panel"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"DIV",
new String[]{"class"},
new String[]{"dr-pnl-b rich-panel-body"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
PanelTagTest.HEADER_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
PanelTagTest.BODY_VALUE,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:panel>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/PickListTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,7 +22,7 @@
private static final String[] options = new String[] {"Option0","Option1","Option2","Option3"};
@Override
- protected void initPageContent() {
+ protected void initTestPage() {
StringBuffer sbOptions = new StringBuffer("");
int index = 0;
for (String option : options){
@@ -35,7 +35,8 @@
sbOptions.append("\"/>\n");
index++;
}
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -55,95 +56,95 @@
@Override
protected void verifyTag() {
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- "Copy all",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- "Copy",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- "Remove All",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- "Remove",
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "TABLE",
- new String[]{"class"},
- new String[]{"rich-list-picklist"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "TABLE",
- new String[]{"class"},
- new String[]{"rich-picklist-body"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "TABLE",
- new String[]{"class"},
- new String[]{"rich-picklist-internal-tab"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
- "TBODY",
- null,
- null,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- int index = 0;
- for (String option : options ){
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- option,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- StringBuffer sbTitle = new StringBuffer("");
- sbTitle.append("f:selectItem itemLabel: ");
- sbTitle.append(option);
- sbTitle.append(" itemValue: ");
- sbTitle.append(index);
- sbTitle.append(" id: id");
- sbTitle.append(index);
- assertVisualEditorContains(xhtmlWebBrowser,
- "OPTION",
- new String[]{"title"},
- new String[]{sbTitle.toString()},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- index++;
- }
- // check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TABLE",1), 0);
- bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
- String hasToStartWith = "<rich:pickList value=\"\">";
- assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().startsWith(hasToStartWith));
- String hasEndWith = "</rich:pickList>";
- assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().endsWith(hasEndWith));
- // select first item in VPE
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("OPTION",0), 0);
- bot.sleep(Timing.time3S());
- String currentLineText = xhtmlEditor.getTextOnCurrentLine();
- StringBuffer sbOption = new StringBuffer("");
- sbOption.append("<f:selectItem itemLabel=\"");
- sbOption.append(options[0]);
- sbOption.append("\" itemValue=\"0\" id=\"id0\"/>");
- assertTrue("Current Line text in Source Pane has to be '" + sbOption.toString() + "'" +
- "\nbut it is '" + currentLineText + "'",
- currentLineText.trim().equals(sbOption.toString()));
- // select second item in Source Editor
- xhtmlEditor.setFocus();
- xhtmlEditor.selectRange(xhtmlEditor.cursorPosition().line + 1,xhtmlEditor.cursorPosition().column,0);
- bot.sleep(Timing.time3S());
- xhtmlWebBrowser.setFocus();
- bot.sleep(Timing.time3S());
- StringBuffer sbOptionTitle = new StringBuffer("");
- sbOptionTitle.append("f:selectItem itemLabel: ");
- sbOptionTitle.append(options[1]);
- sbOptionTitle.append(" itemValue: 1 id: id1");
- assertVisualEditorContains(xhtmlWebBrowser,
- "OPTION",
- new String[]{"title","style"},
- new String[]{sbOptionTitle.toString(),"border: 2px solid rgb(0, 0, 255) ! important;"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Copy all",
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Copy",
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Remove All",
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ "Remove",
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "TABLE",
+ new String[]{"class"},
+ new String[]{"rich-list-picklist"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "TABLE",
+ new String[]{"class"},
+ new String[]{"rich-picklist-body"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "TABLE",
+ new String[]{"class"},
+ new String[]{"rich-picklist-internal-tab"},
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
+ "TBODY",
+ null,
+ null,
+ getTestPageFileName());
+ int index = 0;
+ for (String option : options ){
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ option,
+ getTestPageFileName());
+ StringBuffer sbTitle = new StringBuffer("");
+ sbTitle.append("f:selectItem itemLabel: ");
+ sbTitle.append(option);
+ sbTitle.append(" itemValue: ");
+ sbTitle.append(index);
+ sbTitle.append(" id: id");
+ sbTitle.append(index);
+ assertVisualEditorContains(getVisualEditor(),
+ "OPTION",
+ new String[]{"title"},
+ new String[]{sbTitle.toString()},
+ getTestPageFileName());
+ index++;
+ }
+ // check tag selection
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TABLE",1), 0);
+ bot.sleep(Timing.time3S());
+ String selectedText = getSourceEditor().getSelection();
+ String hasToStartWith = "<rich:pickList value=\"\">";
+ assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ String hasEndWith = "</rich:pickList>";
+ assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
+ // select first item in VPE
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("OPTION",0), 0);
+ bot.sleep(Timing.time3S());
+ String currentLineText = getSourceEditor().getTextOnCurrentLine();
+ StringBuffer sbOption = new StringBuffer("");
+ sbOption.append("<f:selectItem itemLabel=\"");
+ sbOption.append(options[0]);
+ sbOption.append("\" itemValue=\"0\" id=\"id0\"/>");
+ assertTrue("Current Line text in Source Pane has to be '" + sbOption.toString() + "'" +
+ "\nbut it is '" + currentLineText + "'",
+ currentLineText.trim().equals(sbOption.toString()));
+ // select second item in Source Editor
+ getSourceEditor().setFocus();
+ getSourceEditor().selectRange(getSourceEditor().cursorPosition().line + 1,getSourceEditor().cursorPosition().column,0);
+ bot.sleep(Timing.time3S());
+ getVisualEditor().setFocus();
+ bot.sleep(Timing.time3S());
+ StringBuffer sbOptionTitle = new StringBuffer("");
+ sbOptionTitle.append("f:selectItem itemLabel: ");
+ sbOptionTitle.append(options[1]);
+ sbOptionTitle.append(" itemValue: 1 id: id1");
+ assertVisualEditorContains(getVisualEditor(),
+ "OPTION",
+ new String[]{"title","style"},
+ new String[]{sbOptionTitle.toString(),"border: 2px solid rgb(0, 0, 255) ! important;"},
+ getTestPageFileName());
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ProgressTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
*/
public class ProgressTagTest extends AbstractTagTest{
@Override
- protected void initPageContent() {
- jspEditor.setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.JSP,
+ "<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\" %>\n" +
"<%@ taglib uri=\"http://java.sun.com/jsf/core\" prefix=\"f\" %>\n" +
"<%@ taglib uri=\"http://richfaces.org/rich\" prefix=\"rich\" %>\n" +
"<html>\n" +
@@ -38,23 +39,23 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(jspWebBrowser,
- "DIV",
- new String[]{"title","class"},
- new String[]{"rich:progressBar mode: client id: progressBar","rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell"},
- AbstractTagTest.TEST_PAGE_NAME_JSP);
- // check tag selection
- jspWebBrowser.selectDomNode(jspWebBrowser.getDomNodeByTagName("DIV",4), 0);
- bot.sleep(Timing.time3S());
- String selectedText = jspEditor.getSelection();
- final String hasToStartWith = "<rich:progressBar";
- assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().startsWith(hasToStartWith));
- final String hasEndWith = "</rich:progressBar>";
- assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
- "\nbut it is '" + selectedText + "'",
- selectedText.trim().endsWith(hasEndWith));
+ assertVisualEditorContains(getVisualEditor(),
+ "DIV",
+ new String[]{"title","class"},
+ new String[]{"rich:progressBar mode: client id: progressBar","rich-progress-bar-block rich-progress-bar-width rich-progress-bar-shell"},
+ getTestPageFileName());
+ // check tag selection
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
+ bot.sleep(Timing.time3S());
+ String selectedText = getSourceEditor().getSelection();
+ final String hasToStartWith = "<rich:progressBar";
+ assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().startsWith(hasToStartWith));
+ final String hasEndWith = "</rich:progressBar>";
+ assertTrue("Selected text in Source Pane has to end with '" + hasEndWith + "'" +
+ "\nbut it is '" + selectedText + "'",
+ selectedText.trim().endsWith(hasEndWith));
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/SpacerTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -21,8 +21,9 @@
public class SpacerTagTest extends AbstractTagTest{
private static final String SPACER_STYLE = "background-color: red;";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -40,15 +41,15 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"IMG",
new String[]{"width","height","class","style"},
new String[]{"1px","1px","rich-spacer",SpacerTagTest.SPACER_STYLE},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("IMG",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("IMG",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:spacer";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TestPageType.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TestPageType.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TestPageType.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -0,0 +1,6 @@
+package org.jboss.tools.vpe.ui.bot.test.editor.tags;
+
+public enum TestPageType {
+ XHTML,
+ JSP;
+}
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TestPageType.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TogglePanelAndToogleControlTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
private static final String FACET_0_LABEL = "!-* Facet 0 Label";
private static final String FACET_1_LABEL = "!-* Facet 1 Label";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
" xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -49,16 +50,16 @@
@Override
protected void verifyTag() {
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
TogglePanelAndToogleControlTagTest.FACET_0_LABEL,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorNotContainNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorNotContainNodeWithValue(getVisualEditor(),
TogglePanelAndToogleControlTagTest.FACET_1_LABEL,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:togglePanel>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
@@ -68,9 +69,9 @@
"\nbut it is '" + selectedText + "'",
selectedText.trim().endsWith(hasEndWith));
// check rich:toolBarGroup selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("SPAN",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("SPAN",0), 0);
bot.sleep(Timing.time3S());
- selectedText = xhtmlEditor.getSelection();
+ selectedText = getSourceEditor().getSelection();
hasToStartWith = "<rich:toggleControl>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/ToolbarAndToolbarGroupTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -22,8 +22,9 @@
private static final String GROUP_0_LABEL = "!-* Group 0 Label";
private static final String GROUP_1_LABEL = "!-* Group 1 Label";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
" xmlns:rich=\"http://richfaces.org/rich\"\n" +
@@ -47,21 +48,21 @@
@Override
protected void verifyTag() {
- assertVisualEditorContains(xhtmlWebBrowser,
+ assertVisualEditorContains(getVisualEditor(),
"TD",
new String[]{"class"},
new String[]{"dr-toolbar-int rich-toolbar-item"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ToolbarAndToolbarGroupTagTest.GROUP_0_LABEL,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
ToolbarAndToolbarGroupTagTest.GROUP_1_LABEL,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TBODY",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TBODY",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:toolBar>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
@@ -71,9 +72,9 @@
"\nbut it is '" + selectedText + "'",
selectedText.trim().endsWith(hasEndWith));
// check rich:toolBarGroup selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("TBODY",1), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("TBODY",1), 0);
bot.sleep(Timing.time3S());
- selectedText = xhtmlEditor.getSelection();
+ selectedText = getSourceEditor().getSelection();
hasToStartWith = "<rich:toolBarGroup>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/TreeTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -23,8 +23,9 @@
private static final String typePathway = "pathway";
private static final String typeOrganism = "organism";
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -53,24 +54,24 @@
@Override
protected void verifyTag() {
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
- TreeTagTest.typePathway,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
+ TreeTagTest.typePathway,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
TreeTagTest.typeLibrary,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContainsNodeWithValue(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContainsNodeWithValue(getVisualEditor(),
TreeTagTest.typeOrganism,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"IMG",
new String[]{"class"},
new String[]{"treePictureStyle"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("DIV",4), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("DIV",4), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToStartWith = "<rich:tree>";
assertTrue("Selected text in Source Pane has to start with '" + hasToStartWith + "'" +
"\nbut it is '" + selectedText + "'",
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java 2011-04-14 14:48:08 UTC (rev 30577)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/tags/VirtualEarthTagTest.java 2011-04-14 15:50:49 UTC (rev 30578)
@@ -20,8 +20,9 @@
*/
public class VirtualEarthTagTest extends AbstractTagTest{
@Override
- protected void initPageContent() {
- xhtmlEditor.setText("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
+ protected void initTestPage() {
+ initTestPage(TestPageType.XHTML,
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" +
"<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" +
" xmlns:ui=\"http://java.sun.com/jsf/facelets\"\n" +
" xmlns:f=\"http://java.sun.com/jsf/core\"\n" +
@@ -39,19 +40,19 @@
@Override
protected void verifyTag() {
- assertVisualEditorContainsManyNodes(xhtmlWebBrowser,
+ assertVisualEditorContainsManyNodes(getVisualEditor(),
"IMG",
2,
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
- assertVisualEditorContains(xhtmlWebBrowser,
+ getTestPageFileName());
+ assertVisualEditorContains(getVisualEditor(),
"SCRIPT",
new String[]{"type","src"},
new String[]{"text/javascript","mozileLoader.js"},
- AbstractTagTest.TEST_PAGE_NAME_XHTML);
+ getTestPageFileName());
// check tag selection
- xhtmlWebBrowser.selectDomNode(xhtmlWebBrowser.getDomNodeByTagName("IMG",0), 0);
+ getVisualEditor().selectDomNode(getVisualEditor().getDomNodeByTagName("IMG",0), 0);
bot.sleep(Timing.time3S());
- String selectedText = xhtmlEditor.getSelection();
+ String selectedText = getSourceEditor().getSelection();
String hasToBe = "<rich:virtualEarth/>";
assertTrue("Selected text in Source Pane has to be '" + hasToBe + "'" +
"\nbut it is '" + selectedText + "'",
13 years, 7 months
JBoss Tools SVN: r30576 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-04-14 10:14:02 -0400 (Thu, 14 Apr 2011)
New Revision: 30576
Modified:
trunk/build/parent/pom.xml
Log:
add new local mirror of staging composite site for use within Hudson
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2011-04-14 13:54:56 UTC (rev 30575)
+++ trunk/build/parent/pom.xml 2011-04-14 14:14:02 UTC (rev 30576)
@@ -28,11 +28,20 @@
<target.platform.classifier.local>local
</target.platform.classifier.local>
- <jbosstools-nightly>http://download.jboss.org/jbosstools/updates/nightly/3.3.indigo/</jbosstools-nightly>
+ <!-- 1a. URL of latest JBT target platform site -->
<jbosstools-target-site>http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo/l...</jbosstools-target-site>
- <!-- pass in your own path using -Dlocal.site=file://home/$user/trunk/build/target-platform/REPO/ -->
+ <!-- 1b. or, use -Plocal.site -Dlocal.site=file://home/$user/trunk/build/target-platform/REPO/ -->
<local.site>file://home/hudson/static_build_env/jbds/target-platform_3.3.indigo/e37M6-wtp33M6.target/</local.site>
+
+ <!-- 2a. URL of latest JBT nightly staging composite site (all the components in once place) -->
+ <jbosstools-nightly-staging-composite>http://download.jboss.org/jbosstools/builds/staging/_composite_/3.3.indigo/</jbosstools-nightly-staging-composite>
+
+ <!-- 2b., or, use -Plocal.comp -Dlocal.comp=file://path/to/mirror/of/composite/staging/site/ -->
+ <local.composite>file://home/hudson/static_build_env/jbds/builds/staging/_composite_/3.3.indigo/</local.composite>
+
+ <!-- 3. published aggregate update site goes here, for consumption by QE and downstream JBDS builds -->
+ <jbosstools-nightly>http://download.jboss.org/jbosstools/updates/nightly/3.3.indigo/</jbosstools-nightly>
</properties>
<build>
@@ -235,7 +244,7 @@
<repositories>
<repository>
<id>jbosstools-nightly-staging-composite</id>
- <url>http://download.jboss.org/jbosstools/builds/staging/_composite_/3.3.indigo/</url>
+ <url>${jbosstools-nightly-staging-composite}</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -246,6 +255,26 @@
</repository>
</repositories>
</profile>
+ <!-- same contents as jbosstools-nightly-staging-composite, but locally available (to improve network lag) -->
+ <profile>
+ <id>local.composite</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <repositories>
+ <repository>
+ <id>local.composite</id>
+ <url>${local.composite}</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ </profile>
<!-- Contains all the Eclipse.org deps, mirrored onto download.jboss.org.
This is the superset of sites from which the TP is created. Should be
13 years, 7 months
JBoss Tools SVN: r30575 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-14 09:54:56 -0400 (Thu, 14 Apr 2011)
New Revision: 30575
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java
Log:
added redeploy capability to detyped deployer
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java 2011-04-14 13:50:42 UTC (rev 30574)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java 2011-04-14 13:54:56 UTC (rev 30575)
@@ -70,7 +70,24 @@
}
}
-//
+ public static void replace(File file, String host, int port) throws DeployerException {
+ ModelControllerClient client = null;
+ try {
+ client = ModelControllerClient.Factory.create(host, port);
+ ServerDeploymentManager manager = ServerDeploymentManager.Factory.create(client);
+ InitialDeploymentPlanBuilder builder = manager.newDeploymentPlan();
+
+ String name = file.getName();
+ DeploymentPlan plan = builder.replace(name, file).deploy(name).build();
+ manager.execute(plan).get(TIMEOUT, TimeUnit.MILLISECONDS);
+ } catch(Exception e) {
+ throw new DeployerException(e);
+ } finally {
+ StreamUtils.safeClose(client);
+ }
+ }
+
+ //
// public static boolean isDeployed(String name, String host, int port) throws CancellationException, IOException {
// ModelControllerClient client = ModelControllerClient.Factory.create(host, port);
// try {
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java 2011-04-14 13:50:42 UTC (rev 30574)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java 2011-04-14 13:54:56 UTC (rev 30575)
@@ -89,7 +89,7 @@
}
}
- public static void redeploy(File file, String host, int port) throws DeployerException {
+ public static void replace(File file, String host, int port) throws DeployerException {
ModelControllerClient client = null;
try {
client = ModelControllerClient.Factory.create(host, port);
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java 2011-04-14 13:50:42 UTC (rev 30574)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java 2011-04-14 13:54:56 UTC (rev 30575)
@@ -79,7 +79,7 @@
File warFile = DeployerTestUtils.getWarFile(MINIMALISTIC_WAR);
try {
DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
- DetypedDeployer.redeploy(warFile, HOST, MGMT_PORT);
+ DetypedDeployer.replace(warFile, HOST, MGMT_PORT);
} finally {
quietlyUndeploy(warFile);
}
13 years, 7 months
JBoss Tools SVN: r30574 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-14 09:50:42 -0400 (Thu, 14 Apr 2011)
New Revision: 30574
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java
Log:
added redeploy capability to detyped deployer
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java 2011-04-14 13:34:36 UTC (rev 30573)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/internal/TypedDeployer.java 2011-04-14 13:50:42 UTC (rev 30574)
@@ -37,7 +37,6 @@
private static final long TIMEOUT = 15 * 1000;
-
public static void undeploy(String name, String host, int port) throws DeployerException {
ModelControllerClient client = null;
try {
@@ -71,30 +70,7 @@
}
}
- // public static void deploy(File file, String host, int port) throws DeployerException {
-// ModelControllerClient client = null;
-// try {
-// client = ModelControllerClient.Factory.create(host, port);
-// String name = file.getName();
//
-// ModelNode request = new ModelNode();
-// request.get("operation").set("add");
-// request.get("address").add("deployment", name);
-// request.get("enabled").set(true);
-//
-// OperationBuilder operation = OperationBuilder.Factory.create(request);
-// operation.addInputStream(new BufferedInputStream(new FileInputStream(file)));
-// request.get("input-stream-index").set(0);
-// ModelNode result = client.execute(operation.build());
-//
-// throwOnFailure(result);
-// } catch(Exception e) {
-// throw new DeployerException(e);
-// } finally {
-// StreamUtils.safeClose(client);
-// }
-// }
-//
// public static boolean isDeployed(String name, String host, int port) throws CancellationException, IOException {
// ModelControllerClient client = ModelControllerClient.Factory.create(host, port);
// try {
@@ -115,4 +91,8 @@
// }
// }
+ private TypedDeployer() {
+ // inhibit instantiation
+ }
+
}
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java 2011-04-14 13:34:36 UTC (rev 30573)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.detyped/src/org/jboss/ide/eclipse/as7/deployment/detyped/DetypedDeployer.java 2011-04-14 13:50:42 UTC (rev 30574)
@@ -30,6 +30,7 @@
import java.util.concurrent.CancellationException;
import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.as.controller.client.Operation;
import org.jboss.as.controller.client.OperationBuilder;
import org.jboss.as.protocol.StreamUtils;
import org.jboss.dmr.ModelNode;
@@ -73,11 +74,13 @@
request.get("address").add("deployment", name);
request.get("enabled").set(true);
- OperationBuilder operation = OperationBuilder.Factory.create(request);
- operation.addInputStream(new BufferedInputStream(new FileInputStream(file)));
+ OperationBuilder builder = OperationBuilder.Factory.create(request);
+ builder.addInputStream(new BufferedInputStream(new FileInputStream(file)));
+ Operation operation = builder.build();
request.get("input-stream-index").set(0);
- ModelNode result = client.execute(operation.build());
+ ModelNode result = client.execute(operation);
+
throwOnFailure(result);
} catch(Exception e) {
throw new DeployerException(e);
@@ -86,6 +89,31 @@
}
}
+ public static void redeploy(File file, String host, int port) throws DeployerException {
+ ModelControllerClient client = null;
+ try {
+ client = ModelControllerClient.Factory.create(host, port);
+ String name = file.getName();
+
+ ModelNode request = new ModelNode();
+ request.get("operation").set("full-replace-deployment");
+ request.get("name").set(name);
+
+ OperationBuilder builder = OperationBuilder.Factory.create(request);
+ builder.addInputStream(new BufferedInputStream(new FileInputStream(file)));
+ Operation operation = builder.build();
+ request.get("input-stream-index").set(0);
+
+ ModelNode result = client.execute(operation);
+
+ throwOnFailure(result);
+ } catch(Exception e) {
+ throw new DeployerException(e);
+ } finally {
+ StreamUtils.safeClose(client);
+ }
+ }
+
public static boolean isDeployed(String name, String host, int port) throws CancellationException, IOException {
ModelControllerClient client = ModelControllerClient.Factory.create(host, port);
try {
@@ -106,4 +134,7 @@
}
}
+ private DetypedDeployer() {
+ // inhibit instantiation
+ }
}
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java 2011-04-14 13:34:36 UTC (rev 30573)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DetypedDeployerIntegrationTest.java 2011-04-14 13:50:42 UTC (rev 30574)
@@ -31,6 +31,7 @@
import java.text.MessageFormat;
import java.util.List;
+import org.jboss.ide.eclipse.as7.deployment.detyped.DeployerException;
import org.jboss.ide.eclipse.as7.deployment.detyped.DetypedDeployer;
import org.junit.Test;
@@ -62,7 +63,7 @@
}
}
- @Test(expected = Exception.class)
+ @Test(expected = DeployerException.class)
public void cannotDeployWarTwice() throws Exception {
File warFile = DeployerTestUtils.getWarFile(MINIMALISTIC_WAR);
try {
@@ -74,6 +75,17 @@
}
@Test
+ public void canRedeployWar() throws Exception {
+ File warFile = DeployerTestUtils.getWarFile(MINIMALISTIC_WAR);
+ try {
+ DetypedDeployer.deploy(warFile, HOST, MGMT_PORT);
+ DetypedDeployer.redeploy(warFile, HOST, MGMT_PORT);
+ } finally {
+ quietlyUndeploy(warFile);
+ }
+ }
+
+ @Test
public void canQueryDeploymentdeployedState() throws Exception {
File warFile = DeployerTestUtils.getWarFile(MINIMALISTIC_WAR);
File warFile2 = DeployerTestUtils.getWarFile(GWT_HELLOWORLD_WAR);
@@ -85,6 +97,7 @@
assertThat(deployments, hasItems( MINIMALISTIC_WAR, GWT_HELLOWORLD_WAR));
} finally {
quietlyUndeploy(warFile);
+ quietlyUndeploy(warFile2);
}
}
13 years, 7 months
JBoss Tools SVN: r30573 - in trunk/xulrunner2/plugins: org.mozilla.xulrunner.gtk.linux.x86_64/META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-04-14 09:34:36 -0400 (Thu, 14 Apr 2011)
New Revision: 30573
Modified:
trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86/META-INF/MANIFEST.MF
trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/META-INF/MANIFEST.MF
Log:
fix manifest versions for org.mozilla.xulrunner.gtk.linux.* plugins
Modified: trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86/META-INF/MANIFEST.MF
===================================================================
--- trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86/META-INF/MANIFEST.MF 2011-04-14 13:27:36 UTC (rev 30572)
+++ trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86/META-INF/MANIFEST.MF 2011-04-14 13:34:36 UTC (rev 30573)
@@ -3,7 +3,7 @@
Bundle-Name: Mozilla Xulrunner
Bundle-SymbolicName: org.mozilla.xulrunner.gtk.linux.x86;singleton:=tr
ue
-Bundle-Version: 1.9.1.2
+Bundle-Version: 2.0.0.qualifier
Bundle-Vendor: mozilla.org
Eclipse-PlatformFilter: (& (osgi.ws=gtk)(osgi.os=linux)(osgi.arch=x86))
Modified: trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/META-INF/MANIFEST.MF
===================================================================
--- trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/META-INF/MANIFEST.MF 2011-04-14 13:27:36 UTC (rev 30572)
+++ trunk/xulrunner2/plugins/org.mozilla.xulrunner.gtk.linux.x86_64/META-INF/MANIFEST.MF 2011-04-14 13:34:36 UTC (rev 30573)
@@ -3,7 +3,7 @@
Bundle-Name: Mozilla Xulrunner Linux x86_64
Bundle-SymbolicName: org.mozilla.xulrunner.gtk.linux.x86_64;singleton:
=true
-Bundle-Version: 1.9.1.2a
+Bundle-Version: 2.0.0.qualifier
Bundle-Vendor: mozilla.org
Eclipse-PlatformFilter: (& (osgi.ws=gtk)(osgi.os=linux)(osgi.arch=x86_64))
13 years, 7 months