incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1228751 - in /incubator/lcf/trunk: ./ connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/ framework/core/src/test/resource/org/apache/manifoldcf/core/tests/ tests/cmis/src/test/java/org/apache/manifol...
Date Sat, 07 Jan 2012 22:53:39 GMT
Author: kwright
Date: Sat Jan  7 22:53:38 2012
New Revision: 1228751

URL: http://svn.apache.org/viewvc?rev=1228751&view=rev
Log:
Get CMIS UI test working.  Part of CONNECTORS-339.

Added:
    incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseUIDerby.java
  (with props)
    incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java
  (with props)
Modified:
    incubator/lcf/trunk/build.xml
    incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html
    incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.js
    incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.html
    incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.js
    incubator/lcf/trunk/framework/core/src/test/resource/org/apache/manifoldcf/core/tests/VirtualBrowser.py

Modified: incubator/lcf/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/build.xml?rev=1228751&r1=1228750&r2=1228751&view=diff
==============================================================================
--- incubator/lcf/trunk/build.xml (original)
+++ incubator/lcf/trunk/build.xml Sat Jan  7 22:53:38 2012
@@ -2828,6 +2828,43 @@
         </junit>
     </target>
 
+    <target name="run-cmis-UI-tests-derby" depends="compile-cmis-tests,calculate-cmis-tests-condition"
if="cmis-tests.include">
+        <mkdir dir="test-derby-output/cmis"/>
+        <junit fork="true" maxmemory="128m" dir="test-derby-output/cmis" outputtoformatters="true"
showoutput="true" haltonfailure="true">
+            <classpath>
+                <fileset dir="framework/lib">
+                    <include name="*.jar"/>
+                </fileset>
+	      <fileset dir="framework/build/jar">
+		<include name="*.jar"/>
+	      </fileset>
+	      <fileset dir="framework/build/test-jar">
+		<include name="*.jar"/>
+	      </fileset>
+	      <fileset dir="connectors/cmis/build/jar">
+		<include name="*.jar"/>
+	      </fileset>
+	      <fileset dir="connectors/cmis/build/test-jar">
+		<include name="*.jar"/>
+	      </fileset>
+  	      <fileset dir="connectors/cmis/lib">
+		<include name="*.jar"/>
+	      </fileset>
+	      <fileset dir="connectors/nulloutput/build/jar">
+		<include name="*.jar"/>
+	      </fileset>
+	      <fileset dir="connectors/nulloutput/build/test-jar">
+		<include name="*.jar"/>
+	      </fileset>
+                <pathelement location="build/cmis-tests/classes"/>
+            </classpath>
+            <formatter type="brief" usefile="false"/>
+
+            <test name="org.apache.manifoldcf.cmis_tests.NavigationDerbyUI" todir="test-derby-output/cmis"/>
+            <!-- MHL -->
+        </junit>
+    </target>
+
     <target name="run-cmis-loadtests-derby" depends="compile-cmis-tests,calculate-cmis-tests-condition"
if="cmis-tests.include">
         <mkdir dir="test-derby-output/cmis"/>
         <junit fork="true" maxmemory="1024m" dir="test-derby-output/cmis" outputtoformatters="true"
showoutput="true" haltonfailure="true">
@@ -4186,7 +4223,7 @@
 
     <target name="ldtest" depends="load-dr,load-hs"/>
 
-    <target name="uitest" depends="run-filesystem-UI-tests-derby,run-rss-UI-tests-derby,run-webcrawler-UI-tests-derby,run-wiki-UI-tests-derby,run-solr-UI-tests-derby"/>
+    <target name="uitest" depends="run-filesystem-UI-tests-derby,run-rss-UI-tests-derby,run-webcrawler-UI-tests-derby,run-wiki-UI-tests-derby,run-solr-UI-tests-derby,run-cmis-UI-tests-derby"/>
     
     <target name="all" depends="build,javadoc,doc,image,test-dr,test-hs"/>
 

Modified: incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html?rev=1228751&r1=1228750&r2=1228751&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html
(original)
+++ incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html
Sat Jan  7 22:53:38 2012
@@ -119,16 +119,18 @@
 <script type="text/javascript">
 <!--
 var binding = "${BINDING:BJ}";
-if(binding=="ws"){
-  var bindingSelect = document.getElementById("binding");
+var bindingSelect = editconnection.binding;
+if(binding==bindingSelect.options[1].value){
   bindingSelect.options[1].selected = true;
+} else if (binding==bindingSelect.options[0].value){
+  bindingSelect.options[0].selected = true;
 }
 
 var protocol = "${PROTOCOL:BJ}";
-var protocolSelect = document.getElementById("protocol");
-if(protocol=="https"){
+var protocolSelect = editconnection.protocol;
+if(protocol==protocolSelect.options[1].value){
   protocolSelect.options[1].selected = true;
-} else {
+} else if (protocol == protocolSelect.options[0].value){
   protocolSelect.options[0].selected = true;
 }
 //-->

Modified: incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.js
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.js?rev=1228751&r1=1228750&r2=1228751&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.js
(original)
+++ incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.js
Sat Jan  7 22:53:38 2012
@@ -27,46 +27,54 @@ function checkConfigForSave()
   if (editconnection.username.value == "")
   {
     alert("The username must be not null");
+    SelectTab("Server");
     editconnection.username.focus();
     return false;
   }
   if (editconnection.password.value == "")
   {
     alert("The password must be not null");
+    SelectTab("Server");
     editconnection.password.focus();
     return false;
   }
   if (editconnection.binding.value == "")
   {
     alert("The binding must be not null");
+    SelectTab("Server");
     editconnection.binding.focus();
     return false;
   }
   if (editconnection.server.value ==""){
-	  alert("Server name must be not null");
-	  editconnection.server.focus();
-	  return false;
-  } else if(!editconnection.server.value.indexOf('/')==-1) {
-	  alert("Server name can't contain the character '/'");
-	  editconnection.server.focus();
-	  return false;
+    alert("Server name must be not null");
+    SelectTab("Server");
+    editconnection.server.focus();
+    return false;
+  }
+  if(!editconnection.server.value.indexOf('/')==-1) {
+    alert("Server name can't contain the character '/'");
+    SelectTab("Server");
+    editconnection.server.focus();
+    return false;
   }
-  
   if (editconnection.port.value == "")
   {
-	alert("The port must be not null");
-	editconnection.port.focus();
-	return false;
-  } else if (!isInteger(editconnection.port.value)){
-	alert("The server port must be a valid integer");
-	editconnection.port.focus();
-	return false;
+    alert("The port must be not null");
+    SelectTab("Server");
+    editconnection.port.focus();
+    return false;
+  }
+  if (!isInteger(editconnection.port.value)){
+    alert("The server port must be a valid integer");
+    SelectTab("Server");
+    editconnection.port.focus();
+    return false;
   }
-  
   if(editconnection.path.value == ""){
-	  alert("Path must be not null");
-	  editconnection.path.focus();
-	  return false;
+    alert("Path must be not null");
+    SelectTab("Server");
+    editconnection.path.focus();
+    return false;
   }
   return true;
 }

Modified: incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.html
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.html?rev=1228751&r1=1228750&r2=1228751&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.html
(original)
+++ incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.html
Sat Jan  7 22:53:38 2012
@@ -86,16 +86,18 @@
 <script type="text/javascript">
 <!--
 var binding = "${BINDING:BJ}";
-if(binding=="ws"){
-  var bindingSelect = document.getElementById("binding");
+var bindingSelect = editconnection.binding;
+if(binding==bindingSelect.options[1].value){
   bindingSelect.options[1].selected = true;
+} else if (binding==bindingSelect.options[0].value){
+  bindingSelect.options[0].selected = true;
 }
 
 var protocol = "${PROTOCOL:BJ}";
-var protocolSelect = document.getElementById("protocol");
-if(protocol=="https"){
+var protocolSelect = editconnection.protocol;
+if(protocol==protocolSelect.options[1].value){
   protocolSelect.options[1].selected = true;
-} else {
+} else if (protocol == protocolSelect.options[0].value){
   protocolSelect.options[0].selected = true;
 }
 //-->

Modified: incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.js
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.js?rev=1228751&r1=1228750&r2=1228751&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.js
(original)
+++ incubator/lcf/trunk/connectors/cmis/connector/src/main/resource/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_ja_JP.js
Sat Jan  7 22:53:38 2012
@@ -19,58 +19,61 @@
 <!--
 function checkConfig()
 {
+  return true;
+}
+ 
+function checkConfigForSave()
+{
   if (editconnection.username.value == "")
   {
     alert("ユーザ名を入力してください");
+    SelectTab("Server");
     editconnection.username.focus();
     return false;
   }
   if (editconnection.password.value == "")
   {
     alert("パスワードを入力してください");
+    SelectTab("Server");
     editconnection.password.focus();
     return false;
   }
-  if (editconnection.endpoint.value == "")
-  {
-    alert("エンドポイントを入力してください");
-    editconnection.endpoint.focus();
-    return false;
-  }
   if (editconnection.binding.value == "")
   {
     alert("バイディングを入力してください");
+    SelectTab("Server");
     editconnection.binding.focus();
     return false;
   }
- 
-  return true;
-}
- 
-function checkConfigForSave()
-{
-  if (editconnection.username.value == "")
-  {
-    alert("ユーザ名を入力してください");
-    editconnection.username.focus();
+  if (editconnection.server.value ==""){
+    alert("Server name must be not null");
+    SelectTab("Server");
+    editconnection.server.focus();
     return false;
   }
-  if (editconnection.password.value == "")
-  {
-    alert("パスワードを入力してください");
-    editconnection.password.focus();
+  if(!editconnection.server.value.indexOf('/')==-1) {
+    alert("Server name can't contain the character '/'");
+    SelectTab("Server");
+    editconnection.server.focus();
     return false;
   }
-  if (editconnection.binding.value == "")
+  if (editconnection.port.value == "")
   {
-    alert("バイディングを入力してください");
-    editconnection.binding.focus();
+    alert("The port must be not null");
+    SelectTab("Server");
+    editconnection.port.focus();
     return false;
   }
-  if (editconnection.endpoint.value == "")
-  {
-    alert("エンドポイントを入力してください");
-    editconnection.endpoint.focus();
+  if (!isInteger(editconnection.port.value)){
+    alert("The server port must be a valid integer");
+    SelectTab("Server");
+    editconnection.port.focus();
+    return false;
+  }
+  if(editconnection.path.value == ""){
+    alert("Path must be not null");
+    SelectTab("Server");
+    editconnection.path.focus();
     return false;
   }
   return true;

Modified: incubator/lcf/trunk/framework/core/src/test/resource/org/apache/manifoldcf/core/tests/VirtualBrowser.py
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/core/src/test/resource/org/apache/manifoldcf/core/tests/VirtualBrowser.py?rev=1228751&r1=1228750&r2=1228751&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/core/src/test/resource/org/apache/manifoldcf/core/tests/VirtualBrowser.py
(original)
+++ incubator/lcf/trunk/framework/core/src/test/resource/org/apache/manifoldcf/core/tests/VirtualBrowser.py
Sat Jan  7 22:53:38 2012
@@ -754,11 +754,6 @@ class VirtualWindow:
         self.dialog_answers = None
         self.current_url = current_url
 
-        # Parse the data
-        parser = VirtualActionParser( self )
-        parser.feed( data )
-        parser.close( )
-
         # Now, assert javascript objects into the current scope to permit
         # Javascript to work.
 
@@ -774,21 +769,30 @@ class VirtualWindow:
         # document (with form properties and form element properties beneath that).
         # Also, need the shortcut entered, which is a property that's just the form name.
         # First, create the document object.
-        jsdocobject = JSDocObject( )
-        self.jscontext.define_value( "document", jsdocobject )
-        for form_name, form_object in self.forms.iteritems( ):
+        self.jsdocobject = JSDocObject( )
+        self.jscontext.define_value( "document", self.jsdocobject )
+
+        # Window object
+        self.jswindowobject = JSWindowObject( self )
+        self.jscontext.define_value( "window", self.jswindowobject )
+
+        # Finally, need built-in "Option" class
+        jsoptionclassdef = JSOptionClassDef( )
+        self.jscontext.define_value( "Option", jsoptionclassdef )
+
+        # Parse the data
+        parser = VirtualActionParser( self )
+        parser.feed( data )
+        parser.close( )
+
+        """ for form_name, form_object in self.forms.iteritems( ):
             # Build a javascript object representing the form
             jsobject = JSFormObject( form_object )
             # Add this object to the doc object
-            jsdocobject.add_form( form_name, jsobject )
+            self.jsdocobject.add_form( form_name, jsobject )
             # Add this object to the main context
             self.jscontext.define_value( form_name, jsobject )
-        jswindowobject = JSWindowObject( self )
-        self.jscontext.define_value( "window", jswindowobject )
-
-        # Finally, need built-in "Option" class
-        jsoptionclassdef = JSOptionClassDef( )
-        self.jscontext.define_value( "Option", jsoptionclassdef )
+        """
 
     # Public part of interface
 
@@ -937,7 +941,13 @@ class VirtualWindow:
     # Add a form
     def add_form( self, formobject ):
         assert isinstance( formobject, VirtualForm )
-        self.forms[ formobject.get_name( ) ] = formobject
+        form_name = formobject.get_name( )
+        self.forms[ form_name ] = formobject
+        jsobject = JSFormObject( formobject )
+        # Add this object to the doc object
+        self.jsdocobject.add_form( form_name, jsobject )
+        # Add this object to the main context
+        self.jscontext.define_value( form_name, jsobject )
 
     # Add a button
     def add_button( self, buttonobject ):
@@ -1548,6 +1558,7 @@ class VirtualActionParser( HTMLParser.HT
                 method = "MULTIPART"
             print "Form of type %s detected" % method
             self.current_form_instance = VirtualForm( self.window_instance, name, action,
method )
+            self.window_instance.add_form( self.current_form_instance )
         except:
             pass
 
@@ -1556,7 +1567,6 @@ class VirtualActionParser( HTMLParser.HT
             raise Exception("Error, form end without form start")
         self.current_form_active = False
         if self.current_form_instance != None:
-            self.window_instance.add_form( self.current_form_instance )
             self.current_form_instance = None
 
     def start_select( self, attributes ):

Added: incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseUIDerby.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseUIDerby.java?rev=1228751&view=auto
==============================================================================
--- incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseUIDerby.java
(added)
+++ incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseUIDerby.java
Sat Jan  7 22:53:38 2012
@@ -0,0 +1,63 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.cmis_tests;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.agents.interfaces.*;
+import org.apache.manifoldcf.crawler.interfaces.*;
+import org.apache.manifoldcf.crawler.system.ManifoldCF;
+
+import java.io.*;
+import java.util.*;
+import org.junit.*;
+
+/** Tests that run the "agents daemon" should be derived from this */
+public class BaseUIDerby extends org.apache.manifoldcf.crawler.tests.ConnectorBaseUIDerby
+{
+  protected String[] getConnectorNames()
+  {
+    return new String[]{"CMIS Connector"};
+  }
+  
+  protected String[] getConnectorClasses()
+  {
+    return new String[]{"org.apache.manifoldcf.crawler.connectors.cmis.CmisRepositoryConnector"};
+  }
+  
+  protected String[] getOutputNames()
+  {
+    return new String[]{"Null Output"};
+  }
+  
+  protected String[] getOutputClasses()
+  {
+    return new String[]{"org.apache.manifoldcf.agents.output.nullconnector.NullConnector"};
+  }
+
+  protected String[] getAuthorityClasses()
+  {
+    return new String[]{"org.apache.manifoldcf.crawler.connectors.cmis.CmisAuthorityConnector"};
+  }
+  
+  protected String[] getAuthorityNames()
+  {
+    return new String[]{"CMIS authority"};
+  }
+
+}

Propchange: incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseUIDerby.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/BaseUIDerby.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java?rev=1228751&view=auto
==============================================================================
--- incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java
(added)
+++ incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java
Sat Jan  7 22:53:38 2012
@@ -0,0 +1,255 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.cmis_tests;
+
+import org.apache.manifoldcf.core.interfaces.*;
+import org.apache.manifoldcf.agents.interfaces.*;
+import org.apache.manifoldcf.crawler.interfaces.*;
+import org.apache.manifoldcf.crawler.system.ManifoldCF;
+
+import java.io.*;
+import java.util.*;
+import org.junit.*;
+
+import org.apache.manifoldcf.core.tests.HTMLTester;
+
+/** Basic UI navigation tests */
+public class NavigationDerbyUI extends BaseUIDerby
+{
+
+  @Test
+  public void createConnectionsAndJob()
+    throws Exception
+  {
+    testerInstance.newTest(Locale.US);
+    
+    HTMLTester.Window window;
+    HTMLTester.Link link;
+    HTMLTester.Form form;
+    HTMLTester.Textarea textarea;
+    HTMLTester.Selectbox selectbox;
+    HTMLTester.Button button;
+    HTMLTester.Radiobutton radiobutton;
+    HTMLTester.Loop loop;
+    
+    window = testerInstance.openMainWindow("http://localhost:8346/mcf-crawler-ui/index.jsp");
+    
+    // Define an output connection via the UI
+    link = window.findLink(testerInstance.createStringDescription("List output connections"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Add an output connection"));
+    link.click();
+    // Fill in a name
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("connname"));
+    textarea.setValue(testerInstance.createStringDescription("MyOutputConnection"));
+    link = window.findLink(testerInstance.createStringDescription("Type tab"));
+    link.click();
+    // Select a type
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("classname"));
+    selectbox.selectValue(testerInstance.createStringDescription("org.apache.manifoldcf.agents.output.nullconnector.NullConnector"));
+    button = window.findButton(testerInstance.createStringDescription("Continue to next page"));
+    button.click();
+    // Visit the Throttling tab
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Throttling tab"));
+    link.click();
+    // Go back to the Name tab
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Name tab"));
+    link.click();
+    // Now save the connection.
+    window = testerInstance.findWindow(null);
+    button = window.findButton(testerInstance.createStringDescription("Save this output connection"));
+    button.click();
+    
+    // Define a repository connection via the UI
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("List repository connections"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Add a connection"));
+    link.click();
+    // Fill in a name
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("connname"));
+    textarea.setValue(testerInstance.createStringDescription("MyRepositoryConnection"));
+    link = window.findLink(testerInstance.createStringDescription("Type tab"));
+    link.click();
+    // Select a type
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("classname"));
+    selectbox.selectValue(testerInstance.createStringDescription("org.apache.manifoldcf.crawler.connectors.cmis.CmisRepositoryConnector"));
+    button = window.findButton(testerInstance.createStringDescription("Continue to next page"));
+    button.click();
+    // Visit the Throttling tab
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Throttling tab"));
+    link.click();
+    // Server tab
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Server tab"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("username"));
+    textarea.setValue(testerInstance.createStringDescription("foo"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("password"));
+    textarea.setValue(testerInstance.createStringDescription("bar"));
+    // Go back to the Name tab
+    link = window.findLink(testerInstance.createStringDescription("Name tab"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    // Now save the connection.
+    button = window.findButton(testerInstance.createStringDescription("Save this connection"));
+    button.click();
+    
+    // Define an authority connection via the UI
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("List authorities"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Add a new connection"));
+    link.click();
+    // Fill in a name
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    textarea = form.findTextarea(testerInstance.createStringDescription("connname"));
+    textarea.setValue(testerInstance.createStringDescription("MyAuthorityConnection"));
+    link = window.findLink(testerInstance.createStringDescription("Type tab"));
+    link.click();
+    // Select a type
+    window = testerInstance.findWindow(null);
+    form = window.findForm(testerInstance.createStringDescription("editconnection"));
+    selectbox = form.findSelectbox(testerInstance.createStringDescription("classname"));
+    selectbox.selectValue(testerInstance.createStringDescription("org.apache.manifoldcf.crawler.connectors.cmis.CmisAuthorityConnector"));
+    button = window.findButton(testerInstance.createStringDescription("Continue to next page"));
+    button.click();
+    window = testerInstance.findWindow(null);
+    //MHL
+    // Go back to the Name tab
+    link = window.findLink(testerInstance.createStringDescription("Name tab"));
+    link.click();
+    // Now save the connection.
+    window = testerInstance.findWindow(null);
+    button = window.findButton(testerInstance.createStringDescription("Save this authority
connection"));
+    button.click();
+
+    // 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();
+    window = testerInstance.findWindow(null);
+    // MHL
+    // Save the job
+    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=(.*?)-->"),0);
+    testerInstance.printValue(jobID);
+    link = window.findLink(testerInstance.createStringDescription("Delete this job"));
+    link.click();
+    
+    // Wait for the job to go away
+    loop = testerInstance.beginLoop(120);
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Manage jobs"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    HTMLTester.StringDescription isJobNotPresent = window.isNotPresent(jobID);
+    testerInstance.printValue(isJobNotPresent);
+    loop.breakWhenTrue(isJobNotPresent);
+    loop.endLoop();
+    
+    // Delete the authority connection
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("List authorities"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Delete MyAuthorityConnection"));
+    link.click();
+
+    // Delete the repository connection
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("List repository connections"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Delete MyRepositoryConnection"));
+    link.click();
+    
+    // Delete the output connection
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("List output connections"));
+    link.click();
+    window = testerInstance.findWindow(null);
+    link = window.findLink(testerInstance.createStringDescription("Delete MyOutputConnection"));
+    link.click();
+    
+    testerInstance.executeTest();
+  }
+  
+}

Propchange: incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/trunk/tests/cmis/src/test/java/org/apache/manifoldcf/cmis_tests/NavigationDerbyUI.java
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message