TestingParty08: tablesort.inc

cwgordon7 - June 29, 2008 - 19:11
Project:Drupal
Version:7.x-dev
Component:base system
Category:task
Priority:normal
Assigned:cwgordon7
Status:needs work
Description

This information is from the code coverage report (see http://coverage.cwgordon.com/coverage).

We need to test:

1) tablesort_header() with an existing cell class.
2) tablesort_header() with an existing query string.
3) Actual tablesorting.

#1

Wisif - July 2, 2008 - 07:15
Assigned to:Anonymous» Wisif

I expect within 3 weeks to test

#2

catch - August 23, 2008 - 20:46
Title:Tests needed: tablesort.inc» TestingParty08: tablesort.inc
Assigned to:Wisif» Anonymous

Opening this up for the testing party.

#3

SeeSchloss - August 28, 2008 - 08:47

Tests for 1 and 2

ekes and SeeSchloss

AttachmentSize
common.test.20080828.tablesort.patch 1.84 KB

#4

webchick - August 31, 2008 - 07:08
Status:active» needs review

#5

System Message - August 31, 2008 - 07:12

Patch failed to apply. More information can be found at http://testing.drupal.org/node/13893. If you need help with creating patches please look at http://drupal.org/patch/create

#6

Dries - August 31, 2008 - 08:11
Status:needs review» needs work

#7

lilou - August 31, 2008 - 13:26
Status:needs work» needs review
AttachmentSize
common.test.20080831.tablesort.patch 1.91 KB

#8

cwgordon7 - September 1, 2008 - 18:28
Assigned to:Anonymous» cwgordon7
Status:needs review» needs work

Various tabs in various places, coding standards generally needs work on this.

#9

lilou - September 1, 2008 - 19:15
Status:needs work» needs review

Clean patch.

AttachmentSize
common.test.20080901.tablesort.patch 2.01 KB

#10

lilou - September 1, 2008 - 19:18
Status:needs review» needs work

Miss 3)

#11

cwgordon7 - September 1, 2008 - 19:37
Status:needs work» needs review

Re-rolled, 4 passes, 0 fails, 0 exceptions.

AttachmentSize
tablesort_tests_01.patch 2.21 KB

#12

cwgordon7 - September 1, 2008 - 19:38

Note that these are unit tests, it would be great to have functional tests too eventually.

#13

cwgordon7 - September 1, 2008 - 19:39

Meh. Cross-posted, apologies.

#14

moshe weitzman - September 2, 2008 - 21:48

Seems like we could test this whenever we test admin/content/node or similar page.

#15

chrisshattuck - October 12, 2008 - 02:19
Status:needs review» needs work

Sorry, trying to figure out patching, made a little mistake and didn't patch it properly.

#16

chrisshattuck - October 12, 2008 - 02:20
Status:needs work» needs review

Switched status previously based on a bad patch experience. Switching it back to review.

#17

chrisshattuck - October 12, 2008 - 02:29
Status:needs review» reviewed & tested by the community

Patched and ran test successfully:
4 passes, 0 fails, 0 exceptions

#18

webchick - October 12, 2008 - 04:13
Status:reviewed & tested by the community» needs work

Since this is a testing party patch, I'm going to be mercilessly nit-picky in this review. It's only because I care. :)

This one was actually hard. :P I had to think about it for awhile.

<?php
+    $ts = array('name' => '', 'sort' => 'asc', 'query_string' => '');
?>

a) I realize it's easy enough to deduce that $ts == $tablesort, but it'd be nice to be explicit about that fact. Needs changing throughout.
b) Coding standards dictate each of these on their own lines. However, this is consistent with the way table-related arrays are done so I'm leaving it alone for now.

<?php
+    $this->assertEqual($new_cell['class'], 'red active');
?>

Red active? What does that mean? Could you add a message parameter here with more specifics about what's being tested? The general rule of thumb is that by reading the output of the messages in SimpleTest module, we can learn what the test run tested for. This advice applies throughout.

<?php
+    $this->assertEqual($new_cell['class'], 'active');
?>

Same here.

<?php
+   * Tests the handling of additional query strings by Druapls tablesort API.
?>

What's Druapl? :)

#19

catch - October 17, 2009 - 07:18
Component:tests» base system
Category:bug report» task
Priority:critical» normal

Fixing the critical / pending bugs queues to reflect things which are really bugs or release critical.

 
 

Drupal is a registered trademark of Dries Buytaert.