Author: jjankovi
Date: 2012-05-01 09:46:44 -0400 (Tue, 01 May 2012)
New Revision: 40674
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeansXMLValidationQuickFixTest.java
Log:
trying to eliminate problem with waiting for CDI validator
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java 2012-05-01
13:46:11 UTC (rev 40673)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java 2012-05-01
13:46:44 UTC (rev 40674)
@@ -31,7 +31,7 @@
/**
* Method firstly gets beans.xml validation problem. Then
* it opens quick fix wizard, selects default value and
- * press finish button
+ * press finishWithWait button
*/
private void openBeanXMLValidationProblem(ValidationType validationProblemType) {
@@ -42,7 +42,7 @@
QuickFixDialogWizard qfWizard = new QuickFixDialogWizard();
qfWizard.setFix(qfWizard.getAvailableFixes().get(0));
qfWizard.setResource(qfWizard.getResources().get(0));
- qfWizard.finish();
+ qfWizard.finishWithWait();
}
/**
@@ -56,7 +56,7 @@
/**
* Method resolves validation error where there is no such Alternative as
- * configured in beans.xml. It opens quick fix and through finish button
+ * configured in beans.xml. It opens quick fix and through finishWithWait button
* the Bean Wizard dialog is opened where both parameters are used to create
* the new alternative bean
* @param name
@@ -67,16 +67,16 @@
openBeanXMLValidationProblem(ValidationType.NO_CLASS);
CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.BEAN);
if (cdiWizardBase.isAlternative() && cdiWizardBase.canFinish()) {
- cdiWizardBase.setName(name).setPackage(pkg).finish();
+ cdiWizardBase.setName(name).setPackage(pkg).finishWithWait();
}else {
- fail("Dialog can't be finished");
+ fail("Dialog can't be finishWithWaited");
}
}
/**
* Method resolves validation error where there is no such Stereotype as
- * configured in beans.xml. It opens quick fix and through finish button
+ * configured in beans.xml. It opens quick fix and through finishWithWait button
* the Stereotype Wizard dialog is opened where both parameters are used to create
* the new stereotype annotation
* @param name
@@ -87,16 +87,16 @@
openBeanXMLValidationProblem(ValidationType.NO_ANNOTATION);
CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.STEREOTYPE);
if (cdiWizardBase.isAlternative() && cdiWizardBase.canFinish()) {
- cdiWizardBase.setName(name).setPackage(pkg).finish();
+ cdiWizardBase.setName(name).setPackage(pkg).finishWithWait();
}else {
- fail("Dialog can't be finished");
+ fail("Dialog can't be finishWithWaited");
}
}
/**
* Method resolves validation error where there is no such decorator as
- * configured in beans.xml. It opens quick fix and through finish button
+ * configured in beans.xml. It opens quick fix and through finishWithWait button
* the Decorator Wizard dialog is opened where both parameters are used to create
* the new decorator. Interface "java.util.List" is automatically used.
* @param name
@@ -108,16 +108,16 @@
CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.DECORATOR);
cdiWizardBase.addInterface("java.util.List");
if (cdiWizardBase.canFinish()) {
- cdiWizardBase.setName(name).setPackage(pkg).finish();
+ cdiWizardBase.setName(name).setPackage(pkg).finishWithWait();
} else {
- fail("Dialog can't be finished");
+ fail("Dialog can't be finishWithWaited");
}
}
/**
* Method resolves validation error where there is no such Interceptor as
- * configured in beans.xml. It opens quick fix and through finish button
+ * configured in beans.xml. It opens quick fix and through finishWithWait button
* the Interceptor Wizard dialog is opened where both parameters are used to create
* the new Interceptor
* @param name
@@ -128,9 +128,9 @@
openBeanXMLValidationProblem(ValidationType.NO_CLASS);
CDIWizardBase cdiWizardBase = new CDIWizardBase(CDIWizardType.INTERCEPTOR);
if (cdiWizardBase.canFinish()) {
- cdiWizardBase.setName(name).setPackage(pkg).finish();
+ cdiWizardBase.setName(name).setPackage(pkg).finishWithWait();
}else {
- fail("Dialog can't be finished");
+ fail("Dialog can't be finishWithWaited");
}
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeansXMLValidationQuickFixTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeansXMLValidationQuickFixTest.java 2012-05-01
13:46:11 UTC (rev 40673)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/test/BeansXMLValidationQuickFixTest.java 2012-05-01
13:46:44 UTC (rev 40674)
@@ -13,6 +13,7 @@
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.quickfix.base.BeansXMLQuickFixTestBase;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.junit.Test;
/**
@@ -34,6 +35,8 @@
String bean = "A1";
beansHelper.createBeansXMLWithAlternative(getProjectName(), getPackageName(), bean);
+ waitForCDIValidator();
+
resolveAddNewAlternative(bean, getPackageName());
assertTrue(isBeanXMLValidationErrorEmpty());
@@ -106,4 +109,8 @@
}
+ private void waitForCDIValidator() {
+ bot.sleep(Timing.time3S());
+ }
+
}
Show replies by date