Skip to content
Snippets Groups Projects
Commit 3cabea22 authored by Jess's avatar Jess
Browse files

Issue #2826389 by alexpott, kmoll, Robin Monks, Berdir, tbonomelli: Draggable...

Issue #2826389 by alexpott, kmoll, Robin Monks, Berdir, tbonomelli: Draggable List Builder has no pager
parent 480eb82c
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -34,6 +34,11 @@ abstract class DraggableListBuilder extends ConfigEntityListBuilder implements F
*/
protected $weightKey = FALSE;
/**
* {@inheritdoc}
*/
protected $limit = FALSE;
/**
* The form builder.
*
......
<?php
namespace Drupal\Tests\config\Functional;
use Drupal\Tests\BrowserTestBase;
use Drupal\user\Entity\Role;
/**
* Tests draggable list builder.
*
* @group config
*/
class ConfigDraggableListBuilderTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
public static $modules = array('config_test');
/**
* Test draggable lists.
*/
public function testDraggableList() {
$this->drupalLogin($this->drupalCreateUser(array('administer permissions')));
// Create more than 50 roles.
for ($i = 0; $i < 51; $i++) {
$role = Role::create([
'id' => 'role_' . $i,
'label' => "Role $i",
]);
$role->save();
}
// Navigate to Roles page
$this->drupalGet('admin/people/roles');
// Test for the page title.
$this->assertSession()->titleEquals(t('Roles') . ' | Drupal');
// Count the number of rows in table.
$rows = $this->xpath('//form[@class="user-admin-roles-form"]/table/tbody/tr');
$this->assertGreaterThan(50, count($rows));
for ($i = 0; $i < 51; $i++) {
$this->assertSession()->pageTextContains("Role $i");
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment