Author: ljelinko
Date: 2012-08-27 09:21:09 -0400 (Mon, 27 Aug 2012)
New Revision: 43254
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/BrowserUrlMatcher.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/PageSourceMatcher.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/portlet/PortletLoadsInJBPortalMatcher.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/console/ConsoleOutputMatcher.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/factory/PortletMatchersFactory.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/perspective/OpenPerspectiveTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/dialog/property/ProjectPropertyDialogCloseTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardOpeningTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/HotDeploymentGateinTemplate.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunAsLoadsPortalURLTemplate.java
Log:
Merge from 3.3 branch - mainly waiting conditions.
Property changes on: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test
___________________________________________________________________
Added: svn:mergeinfo
+
/branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test:43068-43105,43246
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/BrowserUrlMatcher.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/BrowserUrlMatcher.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/BrowserUrlMatcher.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -2,9 +2,13 @@
import java.util.Arrays;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
import org.hamcrest.Description;
import org.jboss.tools.portlet.ui.bot.matcher.AbstractSWTMatcher;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
/**
* Checks if the URL of the page laoded in the browser is one of the accepted URLs.
@@ -15,11 +19,21 @@
public class BrowserUrlMatcher extends AbstractSWTMatcher<String[]> {
private String realURL;
-
+
+ private long timeout;
+
+ public BrowserUrlMatcher(TaskDuration duration){
+ timeout = duration.getTimeout();
+ }
+
@Override
public boolean matchesSafely(String[] acceptedURL) {
- realURL = SWTBotFactory.getBot().browser().getUrl();
- return Arrays.asList(acceptedURL).contains(realURL);
+ try {
+ SWTBotFactory.getBot().waitUntil(new BrowserContainsUrlCondition(acceptedURL,
realURL), timeout);
+ return true;
+ } catch (TimeoutException e){
+ return false;
+ }
}
@Override
@@ -27,4 +41,31 @@
description.appendText("are the only allowed loaded URLs but it was:");
description.appendValue(realURL);
}
+
+ private class BrowserContainsUrlCondition extends DefaultCondition {
+
+ private String[] acceptedURL;
+
+ private String realURL;
+
+ public BrowserContainsUrlCondition(String[] acceptedURL, String realURL) {
+ this.acceptedURL = acceptedURL;
+ this.realURL = realURL;
+ }
+
+ @Override
+ public boolean test() throws Exception {
+ try {
+ realURL = SWTBotFactory.getBot().browser().getUrl();
+ return Arrays.asList(acceptedURL).contains(realURL);
+ } catch (WidgetNotFoundException e){
+ return false;
+ }
+ }
+
+ @Override
+ public String getFailureMessage() {
+ return null;
+ }
+ }
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/PageSourceMatcher.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/PageSourceMatcher.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/PageSourceMatcher.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -1,8 +1,15 @@
package org.jboss.tools.portlet.ui.bot.matcher.browser;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
import org.hamcrest.Description;
import org.jboss.tools.portlet.ui.bot.matcher.AbstractSWTMatcher;
-import org.jboss.tools.portlet.ui.bot.task.browser.LoadBrowserPageTask;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
/**
* Checks if the given page contains specified text.
@@ -12,20 +19,41 @@
*/
public class PageSourceMatcher extends AbstractSWTMatcher<String> {
+ private String pageText;
+
private String url;
- private String pageText;
+ private long timeout;
- public PageSourceMatcher(String url) {
+ public PageSourceMatcher() {
super();
+ timeout = 0;
+ }
+
+ public PageSourceMatcher(TaskDuration timeout) {
+ super();
+ this.timeout = timeout.getTimeout();
+ }
+
+ public PageSourceMatcher(String url, TaskDuration duration) {
+ this();
this.url = url;
+ this.timeout = duration.getTimeout();
}
-
+
@Override
public boolean matchesSafely(String item) {
- performInnerTask(new LoadBrowserPageTask(url));
- pageText = getBot().browser().getText();
- return pageText.contains(item);
+ SWTBotBrowserExt browser = SWTBotFactory.getBot().browserExt();
+ if (url != null){
+ browser.loadUrlToBrowser(url, SWTBotFactory.getBot());
+ }
+
+ try {
+ SWTBotFactory.getBot().waitUntil(new PageContainsTextCondition(browser, item),
timeout);
+ return true;
+ } catch (TimeoutException e){
+ return false;
+ }
}
@Override
@@ -33,4 +61,33 @@
description.appendText("is on the page, but there was instead: ");
description.appendValue(pageText);
}
+
+ private class PageContainsTextCondition extends DefaultCondition {
+
+ private SWTBotBrowserExt browser;
+
+ private String expectedText;
+
+ public PageContainsTextCondition(SWTBotBrowserExt browser, String item) {
+ this.browser = browser;
+ this.expectedText = item;
+ }
+
+ @Override
+ public boolean test() throws Exception {
+ pageText = browser.getText();
+ if ("".equals(expectedText)){
+ return pageText.equals(expectedText);
+ }
+ System.out.println(pageText);
+ Pattern p = Pattern.compile(expectedText, Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
+ Matcher m = p.matcher(pageText);
+ return m.matches();
+ }
+
+ @Override
+ public String getFailureMessage() {
+ return null;
+ }
+ }
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/portlet/PortletLoadsInJBPortalMatcher.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/portlet/PortletLoadsInJBPortalMatcher.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/browser/portlet/PortletLoadsInJBPortalMatcher.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -4,6 +4,7 @@
import org.jboss.tools.portlet.ui.bot.entity.PortletDefinition;
import org.jboss.tools.portlet.ui.bot.matcher.AbstractSWTMatcher;
import org.jboss.tools.portlet.ui.bot.matcher.browser.PageSourceMatcher;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
/**
* Check if the given portlet can be loaded in EPP 4.x runtime.
@@ -17,11 +18,17 @@
private PageSourceMatcher pageMatcher;
+ private TaskDuration duration;
+
+ public PortletLoadsInJBPortalMatcher(TaskDuration duration){
+ this.duration = duration;
+ }
+
@Override
public boolean matchesSafely(PortletDefinition portletTitle) {
- pageMatcher = new PageSourceMatcher(PORTAL_URL + portletTitle.getPage());
+ pageMatcher = new PageSourceMatcher(PORTAL_URL + portletTitle.getPage(), duration);
pageMatcher.setBot(getBot());
- return pageMatcher.matchesSafely("<span
class=\"portlet-titlebar-title\">" + portletTitle.getDisplayName() +
"</span>");
+ return pageMatcher.matchesSafely(".*<span
class=(.?\")?portlet-titlebar-title(.?\")?>" +
portletTitle.getDisplayName() + "</span>.*");
}
@Override
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/console/ConsoleOutputMatcher.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/console/ConsoleOutputMatcher.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/console/ConsoleOutputMatcher.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -2,6 +2,7 @@
import org.hamcrest.Description;
import org.jboss.tools.portlet.ui.bot.matcher.AbstractSWTMatcher;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
/**
* Checks if the console contains specified text.
@@ -17,6 +18,10 @@
wrappedMatcher = new
org.jboss.tools.ui.bot.ext.matcher.console.ConsoleOutputMatcher();
}
+ public ConsoleOutputMatcher(TaskDuration duration) {
+ wrappedMatcher = new
org.jboss.tools.ui.bot.ext.matcher.console.ConsoleOutputMatcher(duration);
+ }
+
@Override
public boolean matchesSafely(String item) {
return wrappedMatcher.matchesSafely(item);
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/factory/PortletMatchersFactory.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/factory/PortletMatchersFactory.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/factory/PortletMatchersFactory.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -3,6 +3,7 @@
import org.jboss.tools.portlet.ui.bot.entity.PortletDefinition;
import org.jboss.tools.portlet.ui.bot.matcher.SWTMatcher;
import
org.jboss.tools.portlet.ui.bot.matcher.browser.portlet.PortletLoadsInJBPortalMatcher;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
public class PortletMatchersFactory {
@@ -11,6 +12,6 @@
}
public static SWTMatcher<PortletDefinition> canLoadAt4xRuntime(){
- return new PortletLoadsInJBPortalMatcher();
+ return new PortletLoadsInJBPortalMatcher(TaskDuration.NORMAL);
}
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/perspective/OpenPerspectiveTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/perspective/OpenPerspectiveTask.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/matcher/perspective/OpenPerspectiveTask.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -1,7 +1,13 @@
package org.jboss.tools.portlet.ui.bot.matcher.perspective;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.widgetIsEnabled;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
import org.jboss.tools.ui.bot.ext.gen.IPerspective;
/**
@@ -12,6 +18,8 @@
*/
public class OpenPerspectiveTask extends AbstractSWTTask {
+ private static final Logger log = Logger.getLogger(OpenPerspectiveTask.class);
+
private IPerspective perspective;
public OpenPerspectiveTask(IPerspective name) {
@@ -21,6 +29,32 @@
@Override
public void perform() {
+ activateWorkbenchShell();
+ log.info("Opening perspective");
+ log.info("All shells: ");
+ for (SWTBotShell shell : SWTBotFactory.getBot().shells()){
+ log.info(shell.getText() + ": " + shell);
+ log.info("Is active: " + shell.isActive());
+ }
+ getBot().waitUntil(widgetIsEnabled(getBot().menu("Window")),
TaskDuration.NORMAL.getTimeout());
SWTBotFactory.getOpen().perspective(perspective);
}
+
+ public void activateWorkbenchShell(){
+ SWTBotShell[] shells = getBot().shells();
+ if (shells.length == 1){
+ log.info("Only one shell present, assuming it's workbench and
activating");
+ shells[0].activate();
+ } else {
+ log.info("More than one shell present");
+ for (SWTBotShell shell : shells){
+ log.info(shell.getText());
+ }
+ }
+ }
+
+ @Override
+ public SWTBot getBot() {
+ return SWTBotFactory.getBot();
+ }
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/dialog/property/ProjectPropertyDialogCloseTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/dialog/property/ProjectPropertyDialogCloseTask.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/dialog/property/ProjectPropertyDialogCloseTask.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -1,10 +1,11 @@
package org.jboss.tools.portlet.ui.bot.task.dialog.property;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellCloses;
+
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
import org.jboss.tools.portlet.ui.bot.task.wait.WaitWhileTask;
import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
-import org.jboss.tools.ui.bot.ext.condition.ShellIsActiveCondition;
import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
public class ProjectPropertyDialogCloseTask extends AbstractSWTTask {
@@ -13,7 +14,7 @@
public void perform() {
SWTBotShell activeShell = getBot().activeShell();
getBot().button("OK").click();
- performInnerTask(new WaitWhileTask(new ShellIsActiveCondition(activeShell),
TaskDuration.NORMAL));
+ getBot().waitUntil(shellCloses(activeShell), TaskDuration.NORMAL.getTimeout());
performInnerTask(new WaitWhileTask(new NonSystemJobRunsCondition(),
TaskDuration.LONG));
}
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -1,10 +1,14 @@
package org.jboss.tools.portlet.ui.bot.task.server;
-import org.eclipse.swtbot.swt.finder.keyboard.KeyboardFactory;
-import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellIsActive;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.portlet.ui.bot.entity.WorkspaceFile;
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
import org.jboss.tools.portlet.ui.bot.task.workspace.FileContextMenuSelectingTask;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.logging.WidgetsLogger;
/**
* Marks a file as deployable for the specified server (it works only if there is just
one server defined)
@@ -14,6 +18,8 @@
*/
public class MarkFileAsDeployableTask extends AbstractSWTTask {
+ private static final Logger log = Logger.getLogger(MarkFileAsDeployableTask.class);
+
private WorkspaceFile workspaceFile;
public MarkFileAsDeployableTask(WorkspaceFile file) {
@@ -22,8 +28,30 @@
@Override
public void perform() {
+ log.info("Marking " + workspaceFile.getFileName() + " as
deployable");
+ log.info("Logging all shells: ");
+ for (SWTBotShell shell : SWTBotFactory.getBot().shells()){
+ log.info("Shell: " + shell.getText() + ", is active: " +
shell.isActive());
+ }
performInnerTask(new FileContextMenuSelectingTask(workspaceFile, "Mark as
Deployable"));
- // for the confirmation dialog select OK (the dialog is native and normal swtbot
functions do now work)
- KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.RIGHT, Keystrokes.CR,
Keystrokes.LF);
+
+ log.info("Waiting for confirmation shell to appear");
+ log.info("Logging all shells: ");
+ for (SWTBotShell shell : SWTBotFactory.getBot().shells()){
+ log.info("Shell: " + shell.getText() + ", is active: " +
shell.isActive());
+ }
+ SWTBotFactory.getBot().waitUntil(shellIsActive("Really mark these resources as
deployable?"));
+ SWTBotFactory.getBot().shell("Really mark these resources as
deployable?").activate();
+ log.info("Logging all widgets:");
+ log.info("Logging all shells: ");
+ for (SWTBotShell shell : SWTBotFactory.getBot().shells()){
+ log.info("Shell: " + shell.getText() + ", is active: " +
shell.isActive());
+ }
+ WidgetsLogger.log();
+ getBot().button("OK").click();
+
+ log.info("Waiting for confirmation shell to disappear");
+ SWTBotFactory.getBot().waitWhile(shellIsActive("Really mark these resources as
deployable?"));
}
}
+
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardOpeningTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardOpeningTask.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/wizard/WizardOpeningTask.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -1,6 +1,9 @@
package org.jboss.tools.portlet.ui.bot.task.wizard;
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
import org.jboss.tools.ui.bot.ext.wizards.SWTBotNewObjectWizard;
/**
@@ -10,6 +13,8 @@
*
*/
public class WizardOpeningTask extends AbstractSWTTask {
+
+ private static final Logger log = Logger.getLogger(WizardOpeningTask.class);
private String category;
@@ -32,9 +37,29 @@
@Override
public void perform() {
+ activateWorkbenchShell();
+ log.info("Opening wizard");
+ log.info("All shells: ");
+ for (SWTBotShell shell : SWTBotFactory.getBot().shells()){
+ log.info(shell.getText() + ": " + shell);
+ log.info("Is active: " + shell.isActive());
+ }
new SWTBotNewObjectWizard().open(name, getGroupPath());
}
+ private void activateWorkbenchShell(){
+ SWTBotShell[] shells = getBot().shells();
+ if (shells.length == 1){
+ log.info("Only one shell present, assuming it's workbench and
activating");
+ shells[0].activate();
+ } else {
+ log.info("More than one shell present");
+ for (SWTBotShell shell : shells){
+ log.info(shell.getText());
+ }
+ }
+ }
+
private String[] getGroupPath() {
if (category == null){
return new String[0];
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/HotDeploymentGateinTemplate.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/HotDeploymentGateinTemplate.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/HotDeploymentGateinTemplate.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -7,6 +7,7 @@
import org.jboss.tools.portlet.ui.bot.task.editor.CloseAllEditors;
import org.jboss.tools.portlet.ui.bot.task.wizard.web.jboss.AbstractPortletCreationTask;
import org.jboss.tools.portlet.ui.bot.test.testcase.SWTTaskBasedTestCase;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
@@ -31,7 +32,7 @@
doPerform(new ConsoleClearingTask());
doPerform(createPortlet());
- assertThatInWorkspace("undeploy, ctxPath=/" + getProjectName(), new
ConsoleOutputMatcher());
- assertThatInWorkspace("deploy, ctxPath=/" + getProjectName(), new
ConsoleOutputMatcher());
+ assertThatInWorkspace("undeploy, ctxPath=/" + getProjectName(), new
ConsoleOutputMatcher(TaskDuration.LONG));
+ assertThatInWorkspace("deploy, ctxPath=/" + getProjectName(), new
ConsoleOutputMatcher(TaskDuration.LONG));
}
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunAsLoadsPortalURLTemplate.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunAsLoadsPortalURLTemplate.java 2012-08-27
13:13:42 UTC (rev 43253)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/template/RunAsLoadsPortalURLTemplate.java 2012-08-27
13:21:09 UTC (rev 43254)
@@ -11,6 +11,7 @@
import
org.jboss.tools.portlet.ui.bot.task.wizard.web.jboss.JBossPortletCapabilitiesWizardPageFillingTask;
import org.jboss.tools.portlet.ui.bot.test.testcase.SWTTaskBasedTestCase;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
import org.junit.Test;
/**
@@ -32,7 +33,7 @@
doPerform(createJavaPortletTask());
doPerform(runOnServerTask());
- doAssertThatInWorkspace(getExpectedURLs(), new BrowserUrlMatcher());
+ doAssertThatInWorkspace(getExpectedURLs(), new
BrowserUrlMatcher(TaskDuration.NORMAL));
}
private SWTTask createJavaPortletTask() {