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.3 -r1.4
--- openacs-4/contrib/packages/simulation/test/demo-data-setup.test	14 Nov 2003 09:48:54 -0000	1.3
+++ openacs-4/contrib/packages/simulation/test/demo-data-setup.test	14 Nov 2003 13:46:46 -0000	1.4
@@ -1,64 +1,8 @@
-namespace eval ::twt::simulation {}
-
-ad_proc ::twt::simulation::get_object_short_name { name } {
-    set short_name [string tolower $name]
-    regsub -all {\s} $short_name {-} short_name
-
-    return $short_name
-}
-
-ad_proc ::twt::simulation::add_image {
-    {-title:required}
-    {-description ""}
-    {-content_file:required}
-} {
-    Create a new simulation image
-} {
-    do_request /simulation/object-list
-    link follow ~u object-edit?.*parent
-
-    # Choose object type image
-    set_object_form_type image
-    
-    foreach input_name {title description content_file} {
-        field fill [set $input_name] ~n $input_name
-    }
-    form submit
-}
-
-ad_proc ::twt::simulation::set_object_form_type { type } {
-    form find ~n object
-    field find ~n content_type
-    field select2 ~v $type
-    field find ~n __refreshing_p
-    field fill 1
-    form submit
-}
-
-ad_proc ::twt::simulation::add_object {
-    {-type:required}
-    {-title:required}
-} {
-    Create a new simulation object
-} {
-    do_request /simulation/object-list
-    link follow ~u object-edit?.*parent
-
-    set_object_form_type $type
-
-    field find ~n title
-    field fill $title
-    form submit
-}
-
-ad_proc ::twt::simulation::visit_template_page { template_name } {
-
-    do_request /simulation/simbuild/
-    link follow ~u template-edit ~c $template_name    
-}
-
 if { [catch {
-    source [file dirname [info script]]/../../../etc/install/tcl/test-procs.tcl
+    # Source Tcl libraries
+    set script_dir [file dirname [info script]]
+    source "${script_dir}/../../../etc/install/tcl/test-procs.tcl"
+    source "${script_dir}/simulation-test-procs.tcl"
 
     # Test Execution START
 
@@ -106,7 +50,7 @@
     ::twt::user::login_site_wide_admin
 
     ::twt::log_section "Create an image object"
-    do_request /simulation/object-list
+    do_request /simulation/citybuild
     link follow ~u object-edit?.*parent
     form find ~n object
     field find ~n content_type
@@ -128,28 +72,18 @@
     }
 
      ::twt::log_section "Create simulation template"
-     do_request /simulation/template-edit
-      set template_name "Elementary Private Law"
+     do_request /simulation/simbuild/template-edit
+       set template_name "Elementary Private Law"
      field fill $template_name ~n name
      form submit
 
-    ::twt::log_section "Add characters to template"
-    ::twt::simulation::visit_template_page $template_name 
-
-    link follow ~u sim-template-add-objects
-    foreach character_add_url [::twt::get_url_list [response url] sim-template-add-objects-2] {
-        do_request $character_add_url
-    }
-
     ::twt::log_section "Create roles for template"
     ::twt::simulation::visit_template_page $template_name 
 
     link follow ~u role-edit
     set add_role_url [response url]
     foreach character_name [array names characters] {
         do_request $add_role_url
-        field find ~n character_id
-        field select [::twt::simulation::get_object_short_name $character_name]
         field find ~n name
         field fill $characters($character_name)
         form submit
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/test/run'.
Fisheye: No comparison available.  Pass `N' to diff?
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
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/test/simulation-test-procs.tcl	14 Nov 2003 13:47:16 -0000	1.1
@@ -0,0 +1,63 @@
+# Procs to support the Tclwebtest (HTTP level) testing and demo data setup
+# of the simulation package.
+#
+# @author Peter Marklund
+
+namespace eval ::twt::simulation {}
+
+ad_proc ::twt::simulation::get_object_short_name { name } {
+    set short_name [string tolower $name]
+    regsub -all {\s} $short_name {-} short_name
+
+    return $short_name
+}
+
+ad_proc ::twt::simulation::add_image {
+    {-title:required}
+    {-description ""}
+    {-content_file:required}
+} {
+    Create a new simulation image
+} {
+    do_request /simulation/citybuild
+    link follow ~u object-edit?.*parent
+
+    # Choose object type image
+    set_object_form_type image
+    
+    foreach input_name {title description content_file} {
+        field fill [set $input_name] ~n $input_name
+    }
+    form submit
+}
+
+ad_proc ::twt::simulation::set_object_form_type { type } {
+    form find ~n object
+    field find ~n content_type
+    field select2 ~v $type
+    field find ~n __refreshing_p
+    field fill 1
+    form submit
+}
+
+ad_proc ::twt::simulation::add_object {
+    {-type:required}
+    {-title:required}
+} {
+    Create a new simulation object
+} {
+    do_request /simulation/citybuild
+    link follow ~u object-edit?.*parent
+
+    set_object_form_type $type
+
+    field find ~n title
+    field fill $title
+    form submit
+}
+
+ad_proc ::twt::simulation::visit_template_page { template_name } {
+
+    do_request /simulation/simbuild/
+    link follow ~u template-edit ~c $template_name    
+}
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.3 -r1.4
--- openacs-4/packages/simulation/test/demo-data-setup.test	14 Nov 2003 09:48:54 -0000	1.3
+++ openacs-4/packages/simulation/test/demo-data-setup.test	14 Nov 2003 13:46:46 -0000	1.4
@@ -1,64 +1,8 @@
-namespace eval ::twt::simulation {}
-
-ad_proc ::twt::simulation::get_object_short_name { name } {
-    set short_name [string tolower $name]
-    regsub -all {\s} $short_name {-} short_name
-
-    return $short_name
-}
-
-ad_proc ::twt::simulation::add_image {
-    {-title:required}
-    {-description ""}
-    {-content_file:required}
-} {
-    Create a new simulation image
-} {
-    do_request /simulation/object-list
-    link follow ~u object-edit?.*parent
-
-    # Choose object type image
-    set_object_form_type image
-    
-    foreach input_name {title description content_file} {
-        field fill [set $input_name] ~n $input_name
-    }
-    form submit
-}
-
-ad_proc ::twt::simulation::set_object_form_type { type } {
-    form find ~n object
-    field find ~n content_type
-    field select2 ~v $type
-    field find ~n __refreshing_p
-    field fill 1
-    form submit
-}
-
-ad_proc ::twt::simulation::add_object {
-    {-type:required}
-    {-title:required}
-} {
-    Create a new simulation object
-} {
-    do_request /simulation/object-list
-    link follow ~u object-edit?.*parent
-
-    set_object_form_type $type
-
-    field find ~n title
-    field fill $title
-    form submit
-}
-
-ad_proc ::twt::simulation::visit_template_page { template_name } {
-
-    do_request /simulation/simbuild/
-    link follow ~u template-edit ~c $template_name    
-}
-
 if { [catch {
-    source [file dirname [info script]]/../../../etc/install/tcl/test-procs.tcl
+    # Source Tcl libraries
+    set script_dir [file dirname [info script]]
+    source "${script_dir}/../../../etc/install/tcl/test-procs.tcl"
+    source "${script_dir}/simulation-test-procs.tcl"
 
     # Test Execution START
 
@@ -106,7 +50,7 @@
     ::twt::user::login_site_wide_admin
 
     ::twt::log_section "Create an image object"
-    do_request /simulation/object-list
+    do_request /simulation/citybuild
     link follow ~u object-edit?.*parent
     form find ~n object
     field find ~n content_type
@@ -128,28 +72,18 @@
     }
 
      ::twt::log_section "Create simulation template"
-     do_request /simulation/template-edit
-      set template_name "Elementary Private Law"
+     do_request /simulation/simbuild/template-edit
+       set template_name "Elementary Private Law"
      field fill $template_name ~n name
      form submit
 
-    ::twt::log_section "Add characters to template"
-    ::twt::simulation::visit_template_page $template_name 
-
-    link follow ~u sim-template-add-objects
-    foreach character_add_url [::twt::get_url_list [response url] sim-template-add-objects-2] {
-        do_request $character_add_url
-    }
-
     ::twt::log_section "Create roles for template"
     ::twt::simulation::visit_template_page $template_name 
 
     link follow ~u role-edit
     set add_role_url [response url]
     foreach character_name [array names characters] {
         do_request $add_role_url
-        field find ~n character_id
-        field select [::twt::simulation::get_object_short_name $character_name]
         field find ~n name
         field fill $characters($character_name)
         form submit
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/simulation/test/run'.
Fisheye: No comparison available.  Pass `N' to diff?
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
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/test/simulation-test-procs.tcl	14 Nov 2003 13:47:16 -0000	1.1
@@ -0,0 +1,63 @@
+# Procs to support the Tclwebtest (HTTP level) testing and demo data setup
+# of the simulation package.
+#
+# @author Peter Marklund
+
+namespace eval ::twt::simulation {}
+
+ad_proc ::twt::simulation::get_object_short_name { name } {
+    set short_name [string tolower $name]
+    regsub -all {\s} $short_name {-} short_name
+
+    return $short_name
+}
+
+ad_proc ::twt::simulation::add_image {
+    {-title:required}
+    {-description ""}
+    {-content_file:required}
+} {
+    Create a new simulation image
+} {
+    do_request /simulation/citybuild
+    link follow ~u object-edit?.*parent
+
+    # Choose object type image
+    set_object_form_type image
+    
+    foreach input_name {title description content_file} {
+        field fill [set $input_name] ~n $input_name
+    }
+    form submit
+}
+
+ad_proc ::twt::simulation::set_object_form_type { type } {
+    form find ~n object
+    field find ~n content_type
+    field select2 ~v $type
+    field find ~n __refreshing_p
+    field fill 1
+    form submit
+}
+
+ad_proc ::twt::simulation::add_object {
+    {-type:required}
+    {-title:required}
+} {
+    Create a new simulation object
+} {
+    do_request /simulation/citybuild
+    link follow ~u object-edit?.*parent
+
+    set_object_form_type $type
+
+    field find ~n title
+    field fill $title
+    form submit
+}
+
+ad_proc ::twt::simulation::visit_template_page { template_name } {
+
+    do_request /simulation/simbuild/
+    link follow ~u template-edit ~c $template_name    
+}