Author: jjankovi
Date: 2012-01-16 03:25:31 -0500 (Mon, 16 Jan 2012)
New Revision: 37849
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
Log:
Constants for label added
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-01-16
08:12:43 UTC (rev 37848)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-01-16
08:25:31 UTC (rev 37849)
@@ -23,6 +23,16 @@
public class CDIProjectHelper extends CDIBase{
+ private final String CDI_WEB_PROJECT = "CDI Web Project";
+ private final String CDI_GROUP = "CDI (Context and Dependency Injection)";
+ private final String WEB_GROUP = "Web";
+ private final String DYNAMIC_WEB_PROJECT = "Dynamic Web Project";
+ private final String CONFIGURE = "Configure";
+ private final String ADD_CDI_SUPPORT = "Add CDI (Context and Dependency Injection)
support...";
+ private final String PROPERTIES = "Properties";
+ private final String CDI_PROPERTIES_SETTINGS = "CDI (Context and Dependency
Injection) Settings";
+
+
/**
* Method creates new CDI Project with CDI Web Project wizard
* @param projectName
@@ -30,7 +40,7 @@
public void createCDIProjectWithCDIWizard(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate("CDI (Context and Dependency Injection)", "CDI Web
Project").next();
+ .selectTemplate(CDI_GROUP, CDI_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).finish();
util.waitForNonIgnoredJobs();
}
@@ -51,7 +61,7 @@
*/
public void createDynamicWebProjectWithCDIPreset(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate("Web", "Dynamic Web Project").next();
+ .selectTemplate(WEB_GROUP, DYNAMIC_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).setCDIPreset().finish();
util.waitForNonIgnoredJobs();
}
@@ -62,7 +72,7 @@
*/
public void createDynamicWebProjectWithCDIFacets(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate("Web", "Dynamic Web Project").next();
+ .selectTemplate(WEB_GROUP, DYNAMIC_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).setCDIFacet().finish();
bot.sleep(Timing.time5S());
util.waitForNonIgnoredJobs();
@@ -90,7 +100,7 @@
*/
private void createDynamicWebProject(String projectName) {
new NewFileWizardAction().run()
- .selectTemplate("Web", "Dynamic Web Project").next();
+ .selectTemplate(WEB_GROUP, DYNAMIC_WEB_PROJECT).next();
new DynamicWebProjectWizard().setProjectName(projectName).finish();
util.waitForNonIgnoredJobs();
}
@@ -104,9 +114,7 @@
SWTBotTree tree = projectExplorer.bot().tree();
SWTBotTreeItem item = tree.getTreeItem(projectName);
item.expand();
- NodeContextUtil.nodeContextMenu(tree, item, "Configure",
- "Add CDI (Context and Dependency Injection) support...")
- .click();
+ NodeContextUtil.nodeContextMenu(tree, item, CONFIGURE, ADD_CDI_SUPPORT).click();
bot.activeShell().bot().button("OK").click();
bot.sleep(Timing.time2S());
util.waitForNonIgnoredJobs();
@@ -122,9 +130,9 @@
SWTBotTree tree = projectExplorer.bot().tree();
ContextMenuHelper.prepareTreeItemForContextMenu(tree);
- new
SWTBotMenu(ContextMenuHelper.getContextMenu(tree,"Properties",false)).click();
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,PROPERTIES,false)).click();
- bot.tree().expandNode("CDI (Context and Dependency Injection)
Settings").select();
+ bot.tree().expandNode(CDI_PROPERTIES_SETTINGS).select();
boolean isCDISupported = bot.checkBox().isChecked();
bot.button("Cancel").click();
return isCDISupported;
Show replies by date