Author: dazarov
Date: 2009-02-10 12:05:02 -0500 (Tue, 10 Feb 2009)
New Revision: 13567
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3500
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java 2009-02-10
16:53:58 UTC (rev 13566)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java 2009-02-10
17:05:02 UTC (rev 13567)
@@ -1,6 +1,8 @@
package org.jboss.tools.jsf.ui.test;
+import org.eclipse.core.resources.IResource;
import org.eclipse.jface.wizard.IWizard;
+import org.jboss.tools.test.util.JobUtils;
public class CssFileNewWizardTest extends WizardTest {
@@ -22,4 +24,21 @@
public void testCssFileNewWizardValidation2() {
validateFolderAndName();
}
+
+ public void testCssFileNewWizardResults() {
+ // Assert file with name from Name field created in folder with name form Folder field
+ IWizard wizard = getWizardOnProject("aaa");
+
+ boolean canFinish = wizard.canFinish();
+
+ assertTrue("Finish button is disabled.", canFinish);
+
+ wizard.performFinish();
+
+ JobUtils.waitForIdle();
+
+ IResource res = project.findMember("aaa.css");
+
+ assertNotNull(res);
+ }
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java 2009-02-10
16:53:58 UTC (rev 13566)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java 2009-02-10
17:05:02 UTC (rev 13567)
@@ -1,6 +1,8 @@
package org.jboss.tools.jsf.ui.test;
+import org.eclipse.core.resources.IResource;
import org.eclipse.jface.wizard.IWizard;
+import org.jboss.tools.test.util.JobUtils;
public class HtmlFileNewWizardTest extends WizardTest {
@@ -21,5 +23,23 @@
}
public void testHtmlFileNewWizardValidation2() {
- validateFolderAndName(); }
+ validateFolderAndName();
+ }
+
+ public void testHtmlFileNewWizardResults() {
+ // Assert file with name from Name field created in folder with name form Folder field
+ IWizard wizard = getWizardOnProject("aaa");
+
+ boolean canFinish = wizard.canFinish();
+
+ assertTrue("Finish button is disabled.", canFinish);
+
+ wizard.performFinish();
+
+ JobUtils.waitForIdle();
+
+ IResource res = project.findMember("aaa.html");
+
+ assertNotNull(res);
+ }
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java 2009-02-10
16:53:58 UTC (rev 13566)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java 2009-02-10
17:05:02 UTC (rev 13567)
@@ -1,6 +1,8 @@
package org.jboss.tools.jsf.ui.test;
+import org.eclipse.core.resources.IResource;
import org.eclipse.jface.wizard.IWizard;
+import org.jboss.tools.test.util.JobUtils;
public class JsFileNewWizardTest extends WizardTest {
@@ -23,4 +25,21 @@
public void testJsFileNewWizardValidation2() {
validateFolderAndName();
}
+
+ public void testJsFileNewWizardResults() {
+ // Assert file with name from Name field created in folder with name form Folder field
+ IWizard wizard = getWizardOnProject("aaa");
+
+ boolean canFinish = wizard.canFinish();
+
+ assertTrue("Finish button is disabled.", canFinish);
+
+ wizard.performFinish();
+
+ JobUtils.waitForIdle();
+
+ IResource res = project.findMember("aaa.js");
+
+ assertNotNull(res);
+ }
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java 2009-02-10
16:53:58 UTC (rev 13566)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java 2009-02-10
17:05:02 UTC (rev 13567)
@@ -1,6 +1,8 @@
package org.jboss.tools.jsf.ui.test;
+import org.eclipse.core.resources.IResource;
import org.eclipse.jface.wizard.IWizard;
+import org.jboss.tools.test.util.JobUtils;
public class JspFileNewWizardTest extends WizardTest {
@@ -23,4 +25,21 @@
public void testJspFileNewWizardValidation2() {
validateFolderAndName();
}
+
+ public void testJspFileNewWizardResults() {
+ // Assert file with name from Name field created in folder with name form Folder field
+ IWizard wizard = getWizardOnProject("aaa");
+
+ boolean canFinish = wizard.canFinish();
+
+ assertTrue("Finish button is disabled.", canFinish);
+
+ wizard.performFinish();
+
+ JobUtils.waitForIdle();
+
+ IResource res = project.findMember("aaa.jsp");
+
+ assertNotNull(res);
+ }
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java 2009-02-10
16:53:58 UTC (rev 13566)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java 2009-02-10
17:05:02 UTC (rev 13567)
@@ -1,6 +1,8 @@
package org.jboss.tools.jsf.ui.test;
+import org.eclipse.core.resources.IResource;
import org.eclipse.jface.wizard.IWizard;
+import org.jboss.tools.test.util.JobUtils;
public class PropertiesNewWizardTest extends WizardTest {
@@ -23,4 +25,21 @@
public void testPropertiesFileNewWizardValidation2() {
validateFolderAndName();
}
+
+ public void testPropertiesFileNewWizardResults() {
+ // Assert file with name from Name field created in folder with name form Folder field
+ IWizard wizard = getWizardOnProject("aaa");
+
+ boolean canFinish = wizard.canFinish();
+
+ assertTrue("Finish button is disabled.", canFinish);
+
+ wizard.performFinish();
+
+ JobUtils.waitForIdle();
+
+ IResource res = project.findMember("aaa.properties");
+
+ assertNotNull(res);
+ }
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java 2009-02-10
16:53:58 UTC (rev 13566)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java 2009-02-10
17:05:02 UTC (rev 13567)
@@ -1,6 +1,8 @@
package org.jboss.tools.jsf.ui.test;
+import org.eclipse.core.resources.IResource;
import org.eclipse.jface.wizard.IWizard;
+import org.jboss.tools.test.util.JobUtils;
public class XhtmlFileNewWizardTest extends WizardTest {
@@ -23,4 +25,21 @@
public void testXhtmlFileNewWizardValidation2() {
validateFolderAndName();
}
+
+ public void testXhtmlFileNewWizardResults() {
+ // Assert file with name from Name field created in folder with name form Folder field
+ IWizard wizard = getWizardOnProject("aaa");
+
+ boolean canFinish = wizard.canFinish();
+
+ assertTrue("Finish button is disabled.", canFinish);
+
+ wizard.performFinish();
+
+ JobUtils.waitForIdle();
+
+ IResource res = project.findMember("aaa.xhtml");
+
+ assertNotNull(res);
+ }
}
\ No newline at end of file