Author: sdzmitrovich
Date: 2008-01-11 10:18:14 -0500 (Fri, 11 Jan 2008)
New Revision: 5624
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1467Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1501Test.java
Log:
update tests (comments, and other)
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1467Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1467Test.java 2008-01-11
15:17:33 UTC (rev 5623)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1467Test.java 2008-01-11
15:18:14 UTC (rev 5624)
@@ -31,6 +31,15 @@
*
* @author sdzmitrovich
*
+ * test for
http://jira.jboss.com/jira/browse/JBIDE-1467
+ *
+ * the cause of bug : <input type=radio > tags ( which vpe template forms when
+ * process "selectOneRadio" jsf tag ) didn't have equal "name"
attribute
+ *
+ * REQUIREMENT :test page must has only one <h:selectOneRadio > tag
+ *
+ * test checks that all "radio" elements ( of xulRunner DOMDocument ) have
equal
+ * "name" attributes
*/
public class JsfJbide1467Test extends VpeTest {
@@ -49,18 +58,6 @@
* JBIDE's test cases
*/
- /**
- * test for
http://jira.jboss.com/jira/browse/JBIDE-1467
- *
- * the cause of bug : <input type=radio > tags ( which vpe template forms
- * when process "selectOneRadio" jsf tag ) didn't have equal
"name"
- * attribute
- *
- * REQUIREMENT :test page must has only one <h:selectOneRadio > tag
- *
- * test checks that all "radio" elements ( of xulRunner DOMDocument ) have
- * equal "name" attributes
- */
public void testJbide() throws Throwable {
// wait
@@ -85,23 +82,21 @@
nsIDOMDocument document = getVpeVisualDocument(part);
nsIDOMElement element = document.getDocumentElement();
- if (element != null) {
+ assertNotNull(element);
- // get root node
- nsIDOMNode node = (nsIDOMNode) element
- .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+ // get root node
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
- List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
- // find "input" elements
- TestUtil.findElementsByName(node, elements, HTML.TAG_INPUT);
+ // find "input" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_INPUT);
- // check that "radio" elements have equal names
- // (size of list of names == 1 )
- assertEquals(1, getRadioNames(elements).size());
+ // check that "radio" elements have equal names
+ // (size of list of names == 1 )
+ assertEquals(1, getRadioNames(elements).size());
- }
-
// check exception
if (getException() != null) {
throw getException();
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1501Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1501Test.java 2008-01-11
15:17:33 UTC (rev 5623)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JsfJbide1501Test.java 2008-01-11
15:18:14 UTC (rev 5624)
@@ -31,6 +31,26 @@
*
* @author sdzmitrovich
*
+ * test for
http://jira.jboss.com/jira/browse/JBIDE-1467
+ *
+ * the cause of bug :
+ *
+ * 1. <select ... > tag ( which vpe template forms when process
"selectManyMenu"
+ * and "selectManyListbox" jsf tags ) didn't have
multiple="multiple" attribute
+ *
+ * 2. <select ... > tag ( which vpe template forms when process
+ * "selectOneListbox" and "selectManyListbox" jsf tags ) sometimes
had incorrect
+ * "size" attribute
+ *
+ * DISCRIPTION: test consist of two part
+ *
+ * 1. The first page (JBIDE-1501_multiple.jsp) has "selectManyMenu" and
+ * "selectManyListbox" jsf tags. And test checks that all "select"
elements have
+ * "multiple" attribute
+ *
+ * 2. The second page (JBIDE-1501_size.jsp) has "selectOneListbox" and
+ * "selectManyListbox" jsf tags and they was formed so that all
"select"
+ * elements must have size="2" attribute . And test checks "size"
attribute
*/
public class JsfJbide1501Test extends VpeTest {
@@ -40,30 +60,7 @@
super(name);
}
- /**
- * test for
http://jira.jboss.com/jira/browse/JBIDE-1467
- *
- * the cause of bug :
- *
- * 1. <select ... > tag ( which vpe template forms when process
- * "selectManyMenu" and "selectManyListbox" jsf tags ) didn't
have
- * multiple="multiple" attribute
- *
- * 2. <select ... > tag ( which vpe template forms when process
- * "selectOneListbox" and "selectManyListbox" jsf tags ) sometimes
had
- * incorrect "size" attribute
- *
- * DISCRIPTION: test consist of two part
- *
- * 1. The first page (JBIDE-1501_multiple.jsp) has "selectManyMenu" and
- * "selectManyListbox" jsf tags. And test checks that all "select"
elements
- * have "multiple" attribute
- *
- * 2. The second page (JBIDE-1501_size.jsp) has "selectOneListbox" and
- * "selectManyListbox" jsf tags and they was formed so that all
"select"
- * elements must have size="2" attribute . And test checks "size"
attribute
- */
- public void testJbide() throws Throwable {
+ public void testJbideMultiple() throws Throwable {
// wait
TestUtil.waitForJobs();
@@ -111,29 +108,44 @@
}
- // _____2nd Part____//
+ // check exception
+ if (getException() != null) {
+ throw getException();
+ }
+ }
+
+ public void testJbideSize() throws Throwable {
+
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+
+ // _____1st Part____//
+
// get test page path
- file = (IFile) TestUtil.getComponentPath(
+ IFile file = (IFile) TestUtil.getComponentPath(
"JBIDE/1501/JBIDE-1501_size.jsp", IMPORT_PROJECT_NAME);
- input = new FileEditorInput(file);
+ IEditorInput input = new FileEditorInput(file);
// open and get editor
- part = openEditor(input);
+ JSPMultiPageEditor part = openEditor(input);
// get dom document
- document = getVpeVisualDocument(part);
+ nsIDOMDocument document = getVpeVisualDocument(part);
assertNotNull(document);
// get dom element
- element = document.getDocumentElement();
+ nsIDOMElement element = document.getDocumentElement();
assertNotNull(element);
// get root node
- node = (nsIDOMNode) element.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
- elements = new ArrayList<nsIDOMNode>();
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
// find "select" elements
TestUtil.findElementsByName(node, elements, HTML.TAG_SELECT);