incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1225391 - in /incubator/lcf/trunk: ./ connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/ framework/crawler-ui/src/main/webapp/ tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_...
Date Wed, 28 Dec 2011 23:31:26 GMT
Author: kwright
Date: Wed Dec 28 23:31:26 2011
New Revision: 1225391

URL: http://svn.apache.org/viewvc?rev=1225391&view=rev
Log:
Add more testing code (and fix a UI bug or three).  Part of CONNECTORS-339.

Modified:
    incubator/lcf/trunk/build.xml
    incubator/lcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
    incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp
    incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUI.java

Modified: incubator/lcf/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/build.xml?rev=1225391&r1=1225390&r2=1225391&view=diff
==============================================================================
--- incubator/lcf/trunk/build.xml (original)
+++ incubator/lcf/trunk/build.xml Wed Dec 28 23:31:26 2011
@@ -4105,6 +4105,8 @@
 
     <target name="test-hs" depends="run-tests-HSQLDB-framework,run-tests-HSQLDBext-framework,run-tests-HSQLDB-open-connectors,run-tests-HSQLDB-lgpl-connectors,run-tests-HSQLDB-proprietary-connectors,end-to-end-tests-HSQLDB"/>
 
+    <target name="UI" depends="run-filesystem-UI-tests-derby"/>
+    
     <target name="load-dr" depends="end-to-end-loadtests-derby"/>
 
     <target name="load-pg" depends="end-to-end-loadtests-postgresql"/>
@@ -4117,7 +4119,7 @@
 
     <target name="load" depends="load-dr,load-hs"/>
 
-    <target name="all" depends="build-dev,javadoc,doc,image,test-dr,test-pg,test-hs"/>
+    <target name="all" depends="build-dev,javadoc,doc,image,test-dr,test-hs"/>
 
     <target name="help">
       <echo level="info">
@@ -4135,6 +4137,7 @@ test-pg - Compile and run postgresql-bas
 test-my - Compile and run MySQL-based tests (needs MySQL)
 test-hs - Compile and run HSQLDB-based tests
 test    - Compile and run all local tests (Derby and HSQLDB)
+UI      - Compile and run all UI tests (needs Python)
 load-dr - Compile and run Derby-based load tests
 load-pg - Compile and run postgresql-based load tests (needs
           Postgresql)
@@ -4146,7 +4149,7 @@ doc     - Build html site, under the 'di
           (requires Apache Forrest)
 image   - Build release image, under the '.' directory (requires
           Apache Forrest)
-all     - Do it all (requires Apache Forrest and Postgresql)
+all     - Do it all (requires Apache Forrest)
 
 run-script-interpreter - Run the ManifoldCF script interpreter
 

Modified: incubator/lcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java?rev=1225391&r1=1225390&r2=1225391&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
(original)
+++ incubator/lcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
Wed Dec 28 23:31:26 2011
@@ -435,7 +435,16 @@ public class FileConnector extends org.a
     {
       out.print(
 "<table class=\"displaytable\">\n"+
-"  <tr><td class=\"separator\" colspan=\"3\"><hr/></td></tr>\n"
+"  <tr><td class=\"separator\" colspan=\"3\"><hr/></td></tr>\n"+
+"  <tr>\n"+
+"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"FileConnector.Paths2")
+ "</nobr></td>\n"+
+"    <td class=\"boxcell\">\n"+
+"      <table class=\"formtable\">\n"+
+"        <tr class=\"formheaderrow\">\n"+
+"          <td class=\"formcolumnheader\"></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"FileConnector.RootPath")
+ "</nobr></td>\n"+
+"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"FileConnector.Rules")
+ "</nobr></td>\n"+
+"        </tr>\n"
       );
       i = 0;
       k = 0;
@@ -446,20 +455,6 @@ public class FileConnector extends org.a
         {
           String pathDescription = "_"+Integer.toString(k);
           String pathOpName = "specop"+pathDescription;
-          if (k == 0)
-          {
-            out.print(
-"  <tr>\n"+
-"    <td class=\"description\"><nobr>" + Messages.getBodyString(locale,"FileConnector.Paths2")
+ "</nobr></td>\n"+
-"    <td class=\"boxcell\">\n"+
-"      <table class=\"formtable\">\n"+
-"        <tr class=\"formheaderrow\">\n"+
-"          <td class=\"formcolumnheader\"></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"FileConnector.RootPath")
+ "</nobr></td>\n"+
-"          <td class=\"formcolumnheader\"><nobr>" + Messages.getBodyString(locale,"FileConnector.Rules")
+ "</nobr></td>\n"+
-"        </tr>\n"
-            );
-          }
           out.print(
 "        <tr class=\""+(((k % 2)==0)?"evenformrow":"oddformrow")+"\">\n"+
 "          <td class=\"formcolumncell\">\n"+

Modified: incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp?rev=1225391&r1=1225390&r2=1225391&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp (original)
+++ incubator/lcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp Wed Dec 28 23:31:26
2011
@@ -314,7 +314,7 @@
 				eval("editjob."+propertyname+".focus()");
 				return false;
 			}
-			i++;
+			i = i+1;
 		}
 		return true;
 	}
@@ -879,7 +879,7 @@
 				<td class="separator" colspan="4"><hr/></td>
 			</tr>
 			<tr>
-				<td class="description"><nobr><%=Messages.getString(pageContext.getRequest().getLocale(),"editjob.ScheduledTime")%></nobr></td>
+				<td class="description"><nobr><%=Messages.getString(pageContext.getRequest().getLocale(),"editjob.ScheduledTimeColon")%></nobr></td>
 				<td colspan="3" class="value">
 				    <select class="schedulepulldown" multiple="true" name="dayofweek" size="3">
 					<option value="none" <%=(dayOfWeek==null)?"selected=\"selected\"":""%>><%=Messages.getString(pageContext.getRequest().getLocale(),"editjob.AnyDayOfWeek")%></option>

Modified: incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUI.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUI.java?rev=1225391&r1=1225390&r2=1225391&view=diff
==============================================================================
--- incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUI.java
(original)
+++ incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/NavigationUI.java
Wed Dec 28 23:31:26 2011
@@ -45,6 +45,7 @@ public class NavigationUI extends BaseUI
     HTMLTester.Textarea textarea;
     HTMLTester.Selectbox selectbox;
     HTMLTester.Button button;
+    HTMLTester.Radiobutton radiobutton;
     
     window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
     
@@ -145,7 +146,76 @@ public class NavigationUI extends BaseUI
     button = window.findButton(testerInstance.createStringDescription("Save this authority
connection"));
     button.click();
 
-    // MHL to create and delete a job
+    // Create a job
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("List jobs"));
+    link.click();
+    // Add a job
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Add a job"));
+    link.click();
+    // Fill in a name
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editjob"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("description"));
+    textarea.setValue(testerInstance.createStringDescription("MyJob"));
+    link = window.findLink(testerInstance.createStringDescription("Connection tab"));
+    link.click();
+    // Select the connections
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editjob"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("outputname"));
+    selectbox.selectValue(testerInstance.createStringDescription("MyOutputConnection"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("connectionname"));
+    selectbox.selectValue(testerInstance.createStringDescription("MyRepositoryConnection"));
+    button = window.findButton(testerInstance.createStringDescription("Continue to next screen"));
+    button.click();
+    // Visit all the tabs.  Scheduling tab first
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Scheduling tab"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editjob"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("dayofweek"));
+    selectbox.selectValue(testerInstance.createStringDescription("0"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("hourofday"));
+    selectbox.selectValue(testerInstance.createStringDescription("1"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("minutesofhour"));
+    selectbox.selectValue(testerInstance.createStringDescription("30"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("monthofyear"));
+    selectbox.selectValue(testerInstance.createStringDescription("11"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("dayofmonth"));
+    selectbox.selectValue(testerInstance.createStringDescription("none"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("duration"));
+    textarea.setValue(testerInstance.createStringDescription("120"));
+    button = window.findButton(testerInstance.createStringDescription("Add new schedule record"));
+    button.click();
+    // Now, HopFilters
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Hop Filters tab"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editjob"));
+    radiobutton = form.findRadiobutton(testerInstance.createStringDescription("hopcountmode"),testerInstance.createStringDescription("2"));
+    radiobutton.select();
+    link = window.findLink(testerInstance.createStringDescription("Paths tab"));
+    link.click();
+    // Add a record to the Paths list
+    
+    // MHL
+    /* Need a way of checking job status if we're going to save it and delete it, since it
happens in background.
+    // Save the job
+    window = testerInstance.findWindow(null);
+    button = window.findButton(testerInstance.createStringDescription("Save this job"));
+    button.click();
+
+    // Delete the job
+    window = testerInstance.findWindow(null);
+    HTMLTester.StringDescription jobID = window.findMatch(testerInstance.createStringDescription("<!--jobid=(.*?)-->"),1);
+    link = window.findLink(testerInstance.createStringDescription("Delete this job"));
+    link.click();
+    */
+    
     
     // Delete the authority connection
     window = testerInstance.findWindow(null);



Mime
View raw message