'access administration pages',
'administer site configuration',
]));
// Get the list callback page.
$this->
drupalGet('admin/structure/config_test'
);
// Test for the page title.
$this->
assertSession()->
titleEquals('Test configuration | Drupal'
);
// Test for the table.
$this->
assertSession()->
elementsCount('xpath', '//div[@class="layout-content"]//table', 1
);
// Test the table header.
$this->
assertSession()->
elementsCount('xpath', '//div[@class="layout-content"]//table/thead/tr/th', 3
);
// Test the contents of each th cell.
$this->
assertSession()->
elementTextEquals('xpath', '//div[@class="layout-content"]//table/thead/tr/th[1]', 'Label'
);
$this->
assertSession()->
elementTextEquals('xpath', '//div[@class="layout-content"]//table/thead/tr/th[2]', 'Machine name'
);
$this->
assertSession()->
elementTextEquals('xpath', '//div[@class="layout-content"]//table/thead/tr/th[3]', 'Operations'
);
// Check the number of table row cells.
$this->
assertSession()->
elementsCount('xpath', '//div[@class="layout-content"]//table/tbody/tr[1]/td', 3
);