Index: openacs-4/contrib/packages/simulation/test/demo-data-setup.test
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/test/Attic/demo-data-setup.test,v
diff -u -r1.12 -r1.13
--- openacs-4/contrib/packages/simulation/test/demo-data-setup.test	6 Jan 2004 16:41:38 -0000	1.12
+++ openacs-4/contrib/packages/simulation/test/demo-data-setup.test	6 Jan 2004 17:24:18 -0000	1.13
@@ -155,6 +155,12 @@
         form submit
     }
 
+    ::twt::log_section "Create a template from a spec"
+    do_request /simulation/simbuild/template-load
+    field fill "Template loaded from spec" ~n pretty_name
+    field fill [::twt::simulation::get_template_spec] ~n spec
+    form submit
+
 } result] } {
     global errorInfo
 
Index: openacs-4/contrib/packages/simulation/test/simulation-test-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/test/Attic/simulation-test-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/contrib/packages/simulation/test/simulation-test-procs.tcl	6 Jan 2004 16:41:38 -0000	1.3
+++ openacs-4/contrib/packages/simulation/test/simulation-test-procs.tcl	6 Jan 2004 17:24:18 -0000	1.4
@@ -110,3 +110,137 @@
     field select $user_name
     form submit    
 }
+
+ad_proc ::twt::simulation::get_template_spec {} {
+    return "simulatie_tilburg {
+    description {Use case 1 template from Leiden team.}
+    description_mime_type text/enhanced
+    object_type acs_object
+    package_key simulation
+    pretty_name {
+        Simulatie Tilburg
+    }
+    roles {
+        lawyer {
+            pretty_name Lawyer
+        }
+        client {
+            pretty_name Client
+        }
+        other_lawyer {
+            pretty_name {
+                Other lawyer
+            }
+        }
+        other_client {
+            pretty_name {
+                Other client
+            }
+        }
+        mentor {
+            pretty_name Mentor
+        }
+        secretary {
+            pretty_name Secretary
+        }
+    }
+    actions {
+        initialize {
+            initial_action_p t
+            new_state started
+            pretty_name Initialize
+            attachment_num 0
+        }
+        ask_client {
+            assigned_role lawyer
+            assigned_states started
+            new_state open
+            pretty_name {
+                Ask client
+            }
+            attachment_num 1
+            recipient_role client
+        }
+        ask_client_for_more_information {
+            assigned_role lawyer
+            enabled_states open
+            pretty_name {Ask Client for more information}
+            attachment_num 1
+            recipient_role client
+        }
+        consult_lawyer {
+            assigned_role lawyer
+            enabled_states open
+            pretty_name {
+                Consult lawyer
+            }
+            attachment_num 1
+            recipient_role other_lawyer
+        }
+        visit_the_library {
+            assigned_role lawyer
+            enabled_states open
+            pretty_name {Visit the library}
+            attachment_num 0
+            recipient_role lawyer
+        }
+        consult_mentor {
+            assigned_role lawyer
+            enabled_states open
+            pretty_name {
+                Consult mentor
+            }
+            attachment_num 1
+            recipient_role mentor
+        }
+        mentor_intervenes {
+            assigned_role mentor
+            enabled_states open
+            pretty_name {
+                Mentor intervenes
+            }
+            attachment_num 1
+            recipient_role lawyer
+        }
+        consult_secretary {
+            assigned_role lawyer
+            enabled_states open
+            pretty_name {
+                Consult secretary
+            }
+            attachment_num 1
+            recipient_role secretary
+        }
+        write_legal_advice {
+            assigned_role lawyer
+            assigned_states open
+            new_state written
+            pretty_name {Write legal advice}
+            attachment_num 1
+            recipient_role secretary
+        }
+        correct_spell_check_etc {
+            assigned_role secretary
+            enabled_states written
+            new_state done
+            pretty_name {Correct, spell-check, etc.}
+            attachment_num 1
+            recipient_role client
+        }
+    }
+    states {
+        started {
+            pretty_name Started
+        }
+        open {
+            pretty_name Open
+        }
+        written {
+            pretty_name Written
+        }
+        done {
+            pretty_name Done
+        }
+    }
+}"
+}
Index: openacs-4/packages/simulation/test/demo-data-setup.test
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/test/demo-data-setup.test,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/simulation/test/demo-data-setup.test	6 Jan 2004 16:41:38 -0000	1.12
+++ openacs-4/packages/simulation/test/demo-data-setup.test	6 Jan 2004 17:24:18 -0000	1.13
@@ -155,6 +155,12 @@
         form submit
     }
 
+    ::twt::log_section "Create a template from a spec"
+    do_request /simulation/simbuild/template-load
+    field fill "Template loaded from spec" ~n pretty_name
+    field fill [::twt::simulation::get_template_spec] ~n spec
+    form submit
+
 } result] } {
     global errorInfo
 
Index: openacs-4/packages/simulation/test/simulation-test-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/test/simulation-test-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/simulation/test/simulation-test-procs.tcl	6 Jan 2004 16:41:38 -0000	1.3
+++ openacs-4/packages/simulation/test/simulation-test-procs.tcl	6 Jan 2004 17:24:18 -0000	1.4
@@ -110,3 +110,137 @@
     field select $user_name
     form submit    
 }
+
+ad_proc ::twt::simulation::get_template_spec {} {
+    return "simulatie_tilburg {
+    description {Use case 1 template from Leiden team.}
+    description_mime_type text/enhanced
+    object_type acs_object
+    package_key simulation
+    pretty_name {
+        Simulatie Tilburg
+    }
+    roles {
+        lawyer {
+            pretty_name Lawyer
+        }
+        client {
+            pretty_name Client
+        }
+        other_lawyer {
+            pretty_name {
+                Other lawyer
+            }
+        }
+        other_client {
+            pretty_name {
+                Other client
+            }
+        }
+        mentor {
+            pretty_name Mentor
+        }
+        secretary {
+            pretty_name Secretary
+        }
+    }
+    actions {
+        initialize {
+            initial_action_p t
+            new_state started
+            pretty_name Initialize
+            attachment_num 0
+        }
+        ask_client {
+            assigned_role lawyer
+            assigned_states started
+            new_state open
+            pretty_name {
+                Ask client
+            }
+            attachment_num 1
+            recipient_role client
+        }
+        ask_client_for_more_information {
+            assigned_role lawyer
+            enabled_states open
+            pretty_name {Ask Client for more information}
+            attachment_num 1
+            recipient_role client
+        }
+        consult_lawyer {
+            assigned_role lawyer
+            enabled_states open
+            pretty_name {
+                Consult lawyer
+            }
+            attachment_num 1
+            recipient_role other_lawyer
+        }
+        visit_the_library {
+            assigned_role lawyer
+            enabled_states open
+            pretty_name {Visit the library}
+            attachment_num 0
+            recipient_role lawyer
+        }
+        consult_mentor {
+            assigned_role lawyer
+            enabled_states open
+            pretty_name {
+                Consult mentor
+            }
+            attachment_num 1
+            recipient_role mentor
+        }
+        mentor_intervenes {
+            assigned_role mentor
+            enabled_states open
+            pretty_name {
+                Mentor intervenes
+            }
+            attachment_num 1
+            recipient_role lawyer
+        }
+        consult_secretary {
+            assigned_role lawyer
+            enabled_states open
+            pretty_name {
+                Consult secretary
+            }
+            attachment_num 1
+            recipient_role secretary
+        }
+        write_legal_advice {
+            assigned_role lawyer
+            assigned_states open
+            new_state written
+            pretty_name {Write legal advice}
+            attachment_num 1
+            recipient_role secretary
+        }
+        correct_spell_check_etc {
+            assigned_role secretary
+            enabled_states written
+            new_state done
+            pretty_name {Correct, spell-check, etc.}
+            attachment_num 1
+            recipient_role client
+        }
+    }
+    states {
+        started {
+            pretty_name Started
+        }
+        open {
+            pretty_name Open
+        }
+        written {
+            pretty_name Written
+        }
+        done {
+            pretty_name Done
+        }
+    }
+}"
+}