List Tables: After [38703], [38706], and [40118], adjust the jQuery selector to make the selection of a range of checkboxes work again.

Unprop afercia.
Fixes #40056.

Merges [40268] to the 4.7 branch.



git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40327 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler 2017-03-24 18:49:07 +00:00
parent e63968f21d
commit 8b0f76c917
1 changed files with 54 additions and 0 deletions

View File

@ -365,6 +365,60 @@ class Tests_Query_Results extends WP_UnitTestCase {
), wp_list_pluck( $posts, 'post_title' ) );
}
/**
* @ticket 39055
*/
function test_query_orderby_post__in_with_no_order_specified() {
$post__in_array = array( self::$post_ids[2], self::$post_ids[0], self::$post_ids[1] );
$expected_returned_array = array( self::$post_ids[2], self::$post_ids[0], self::$post_ids[1] );
$q = new WP_Query( array(
'post__in' => $post__in_array,
'orderby' => 'post__in',
'fields' => 'ids'
) );
// Expect post ids in the same order as post__in array when no 'order' param is passed in
$this->assertSame( $expected_returned_array, $q->posts );
}
/**
* @ticket 39055
*/
function test_query_orderby_post__in_with_order_asc() {
$post__in_array = array( self::$post_ids[2], self::$post_ids[0], self::$post_ids[1] );
$expected_returned_array = array( self::$post_ids[2], self::$post_ids[0], self::$post_ids[1] );
$q = new WP_Query( array(
'post__in' => $post__in_array,
'orderby' => 'post__in',
'order' => 'asc',
'fields' => 'ids'
) );
// Expect post ids in the same order as post__in array when order=asc is passed in
$this->assertSame( $expected_returned_array, $q->posts );
}
/**
* @ticket 39055
*/
function test_query_orderby_post__in_with_order_desc() {
$post__in_array = array( self::$post_ids[1], self::$post_ids[2], self::$post_ids[0] );
$expected_returned_array = array( self::$post_ids[1], self::$post_ids[2], self::$post_ids[0] );
$q = new WP_Query( array(
'post__in' => $post__in_array,
'orderby' => 'post__in',
'order' => 'desc',
'fields' => 'ids'
) );
// Note that results are returned in the order specified in the post__in array
// Order=desc does not have an effect on the order of returned results
$this->assertSame( $expected_returned_array, $q->posts );
}
/**
* @ticket 27252
* @ticket 31194