Skip to content

Commit 6157259

Browse files
alex_optimpaul-m
authored andcommitted
Issue #2821742 by alex_optim, navneet0693, rfay: Tablesort Example nonfunctional for non-admin user
1 parent b83de41 commit 6157259

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

tablesort_example/tablesort_example.routing.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ tablesort_example_description:
44
_controller: '\Drupal\tablesort_example\Controller\TableSortExampleController::description'
55
requirements:
66
_permission: 'access content'
7+
options:
8+
no_cache: 'TRUE'

tablesort_example/tests/src/Functional/TableSortExampleTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,44 +41,38 @@ public function testTableSortExampleBasic() {
4141
// Ordered by number decending.
4242
$item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[1]');
4343
$this->assertEquals(7, $item->getText(), 'Ordered by number decending.');
44-
drupal_flush_all_caches();
4544

4645
$this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'asc', 'order' => 'Numbers')));
4746
$assert->statusCodeEquals(200);
4847
// Ordered by Number ascending.
4948
$item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[1]');
5049
$this->assertEquals(1, $item->getText(), 'Ordered by Number ascending.');
51-
drupal_flush_all_caches();
5250

5351
// Sort by Letters.
5452
$this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'desc', 'order' => 'Letters')));
5553
$assert->statusCodeEquals(200);
5654
// Ordered by Letters decending.
5755
$item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[2]');
5856
$this->assertEquals('w', $item->getText(), 'Ordered by Letters decending.');
59-
drupal_flush_all_caches();
6057

6158
$this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'asc', 'order' => 'Letters')));
6259
$assert->statusCodeEquals(200);
6360
// Ordered by Letters ascending.
6461
$item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[2]');
6562
$this->assertEquals('a', $item->getText(), 'Ordered by Letters ascending.');
66-
drupal_flush_all_caches();
6763

6864
// Sort by Mixture.
6965
$this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'desc', 'order' => 'Mixture')));
7066
$assert->statusCodeEquals(200);
7167
// Ordered by Mixture decending.
7268
$item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[3]');
7369
$this->assertEquals('t982hkv', $item->getText(), 'Ordered by Mixture decending.');
74-
drupal_flush_all_caches();
7570

7671
$this->drupalGet('/examples/tablesort-example', array('query' => array('sort' => 'asc', 'order' => 'Mixture')));
7772
$assert->statusCodeEquals(200);
7873
// Ordered by Mixture ascending.
7974
$item = $this->getSession()->getPage()->find('xpath', '//tbody/tr/td[3]');
8075
$this->assertEquals('0kuykuh', $item->getText(), 'Ordered by Mixture ascending.');
81-
drupal_flush_all_caches();
8276

8377
}
8478

0 commit comments

Comments
 (0)