Index: simpletest.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/simpletest.js,v
retrieving revision 1.2
diff -u -p -r1.2 simpletest.js
--- simpletest.js	18 Sep 2007 15:30:06 -0000	1.2
+++ simpletest.js	5 Apr 2008 23:30:14 -0000
@@ -1,8 +1,9 @@
 // $Id: simpletest.js,v 1.2 2007/09/18 15:30:06 rokZlender Exp $
+
 /**
  * Creates a select all checkbox before in every test group fieldset
  */
-$(document).ready(function() {
+/*$(document).ready(function() {
   $('.select_all').each(function() {
     var legend = $('> legend', this);
     var cbs =  $('fieldset :checkbox', this);
@@ -31,4 +32,71 @@ $(document).ready(function() {
     // add select all checkbox
     legend.after(item);
   });
-});
\ No newline at end of file
+});*/
+
+$(document).ready(function() {
+	//adds expand-collapse functionality
+	$('img.simpletest-menu-collapse').click(function(){
+		if($(this).data('collapsed') == 1){
+			$(this).data('collapsed', 0);
+			this.src = '/misc/menu-expanded.png';
+		}else{
+			$(this).data('collapsed',1);
+			this.src = '/misc/menu-collapsed.png';
+		}
+		//toggle all of the trs
+		$("tr."+this.id.replace(/\-menu\-collapse/,'')+"-test").toggle();
+	});
+
+  $('.select-all').each(function() {
+  	var checkbox = $('<input type="checkbox" id="'+ this.id +'" />');
+    $('#'+ this.id).html(checkbox);
+
+    var checkboxes = $('.'+ this.id +'-test');
+    var selectAllChecked = 1;
+    var collapsed = 1;
+    for (var i = 0; i < checkboxes.length; i++) {
+      if (!checkboxes[i].checked) {
+        selectAllChecked = 0;
+      }
+      else {
+        collapsed = 0;
+      }
+    }
+    
+    // Finds all checkboxes for particular test group and sets them to the "check all" state.
+    checkbox.attr('checked', selectAllChecked).click(function() {
+  		//if it's checked, make sure that we can see all the sub-tests
+  		if(this.checked){
+  			$(this.parentNode.parentNode).find("img.simpletest-menu-collapse").each(function(){
+  				if($(this).data('collapsed') != 0){
+  					$(this).data('collapsed',1);
+  					$(this).click();
+  				}
+  			});
+  		}
+      var rows = $('.'+ this.id +'-test');
+      for (var i = 0; i < rows.length; i++) {
+        $(rows[i]).find(':checkbox').attr('checked', this.checked);
+      }
+    }).end();
+  });
+  
+  //set the initial state of the expand-collapse 
+	$('img.simpletest-menu-collapse').each(function(){
+		//only set the state if it has not been set previously
+		if($(this).data('collapsed') == undefined){
+			$(this).data('collapsed',1);
+			//see if any of the child checkboxes are checked and expand the menu if they are
+			var doCheck = false;
+			$("tr."+this.id.replace(/\-menu\-collapse/,'')+"-test").find("input").each(function(){
+				if(this.checked){
+					doCheck = true;
+				}
+			})
+			if(doCheck){
+				$(this).click()
+			}
+		}
+	});
+});
Index: simpletest.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/simpletest.module,v
retrieving revision 1.42
diff -u -p -r1.42 simpletest.module
--- simpletest.module	5 Apr 2008 19:19:26 -0000	1.42
+++ simpletest.module	5 Apr 2008 23:30:14 -0000
@@ -44,6 +44,17 @@ function simpletest_perm() {
 }
 
 /**
+ * Implemenation of hook_theme().
+ */
+function simpletest_theme() {
+  return array(
+    'simpletest_overview_form' => array(
+      'arguments' => array('form' => NULL)
+    ),
+  );
+}
+
+/**
  * Try to load the simepletest
  * @return boolean TRUE if the load succeeded
  */
@@ -154,7 +165,9 @@ function simpletest_overview_form_submit
  * Form callback;  make the form to run tests
  */
 function simpletest_overview_form() {
-  $output = array();
+  $output = array(
+    "#theme" => 'simpletest_overview_form'
+  );
 
   $total_test = &simpletest_get_total_test();
 
@@ -210,6 +223,62 @@ function simpletest_overview_form() {
 }
 
 /**
+ * ...?
+ *
+ * @ingroup themeable
+ */
+function theme_simpletest_overview_form($form) {
+  $output = '';
+  $header = array(
+    t('Test'),
+    t('Description'),
+    array('data' => t('Run'), 'class' => 'checkbox')
+  );
+  
+  $rows = array();
+  foreach (element_children($form) as $gid) {
+    if (isset($form[$gid]['tests'])) {
+      $element = &$form[$gid];
+      $test_class = strtolower(trim(preg_replace("/[^\w\d]/","-",$element["#title"])));
+      
+      $row = array();
+      $row[] = array(
+      	'data' => theme('image','misc/menu-collapsed.png','Menu Collapse','Menu Collapse',array('id' => $test_class . "-menu-collapse",'class' => 'simpletest-menu-collapse')) . "&nbsp;" . $element["#title"], 
+      	'style' => 'font-weight: bold;'
+      );
+      $row[] = $element['#description'];
+      $i = 0;
+      foreach (element_children($element['tests']) as $test) {
+        $i++;
+      }
+      $row[] = array('id' => $test_class, 'class' => 'select-all');
+      $rows[] = array('data' => $row, 'class' => 'odd');
+      
+      foreach (element_children($element['tests']) as $test_name) {
+        $test = $element['tests'][$test_name];
+        $row = array();
+        $row[] = theme('indentation', 1) . $test['#title'];
+        $row[] = $test['#description'];
+        
+        unset($test['#title']);
+        unset($test['#description']);
+        $test['#name'] = $test_name;
+        $row[] = drupal_render($test);
+        $row = array('data' => $row, 'style' => 'display:none;', 'class' => $test_class .'-test');
+        $rows[] = $row;
+      }
+      unset($form[$gid]);
+    }
+  }
+  $output .= theme('table', $header, $rows, array());
+  
+//  $output .= drupal_render($form);
+  $output .= drupal_render($form);
+  
+  return $output;
+}
+
+/**
  * Actually runs tests
  * @param array $testlist list of tests to run or DEFAULT NULL run all tests
  * @param boolean $html_reporter true if you want results in simple html, FALSE for full drupal page
Index: simpletest.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/simpletest.install,v
retrieving revision 1.3
diff -u -p -r1.3 simpletest.install
--- simpletest.install	4 Apr 2008 22:45:25 -0000	1.3
+++ simpletest.install	5 Apr 2008 23:30:14 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: simpletest.install,v 1.3 2008/04/04 22:45:25 boombatower Exp $
+// $Id: simpletest.install,v 1.2 2008/03/22 00:33:30 boombatower Exp $
 
 /**
  * Implementation of hook_install().
@@ -80,7 +80,7 @@ function simpletest_get_file_count($dire
   $files = scandir($directory);
   $count = 0;
   foreach ($files as $file) {
-    if (preg_match('/'. $filename .'.*?/', $file)) {
+    if (fnmatch($filename .'*', $file)) {
       $count++;
     }
   }
Index: simpletest.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/simpletest/simpletest.info,v
retrieving revision 1.7
diff -u -p -r1.7 simpletest.info
--- simpletest.info	4 Apr 2008 23:07:46 -0000	1.7
+++ simpletest.info	5 Apr 2008 23:30:14 -0000
@@ -1,5 +1,5 @@
-; $Id: simpletest.info,v 1.7 2008/04/04 23:07:46 boombatower Exp $
-name = "SimpleTest"
-description = "Provides SimpleTest classes to developers as well as some standard tests for Drupal core."
+; $Id: simpletest.info,v 1.6 2008/03/23 03:35:38 boombatower Exp $
+name = "SimpleTest module"
+description = "Provides simpletest classes to developers as well as some standard tests for Drupal"
 package = Simpletest
 core = 7.x
