$this->assertSession()->elementTextContains('xpath',"//div[@role='contentinfo' and h2[text()='Status message']]",'Module Layout Discovery has been installed.');
$this->assertSession()->elementNotExists('xpath',"//div[@role='contentinfo' and h2[text()='Status message']]//a");
$this->assertSession()->elementTextContains('xpath',"//div[@role='status' and h2[text()='Status message']]",'Module Layout Discovery has been installed.');
$this->assertSession()->elementNotExists('xpath',"//div[@role='status' and h2[text()='Status message']]//a");
// Enable a module that defines permissions.
$edit=['modules[filter][enable]'=>'filter'];
$this->submitForm($edit,'Install');
$this->assertSession()->elementTextContains('xpath',"//div[@role='contentinfo' and h2[text()='Status message']]",'Module Filter has been installed.');
$this->assertSession()->elementExists('xpath',"//div[@role='contentinfo' and h2[text()='Status message']]//a[contains(@href, '/admin/people/permissions/module/filter')]");
$this->assertSession()->elementTextContains('xpath',"//div[@role='status' and h2[text()='Status message']]",'Module Filter has been installed.');
$this->assertSession()->elementExists('xpath',"//div[@role='status' and h2[text()='Status message']]//a[contains(@href, '/admin/people/permissions/module/filter')]");
// Enable a module that has dependencies and both define permissions.
$this->assertSession()->elementTextContains('xpath',"//div[@role='contentinfo' and h2[text()='Status message']]",'2 modules have been installed: Content Moderation, Workflows.');
$this->assertSession()->elementExists('xpath',"//div[@role='contentinfo' and h2[text()='Status message']]//a[contains(@href, '/admin/people/permissions/module/content_moderation%2Cworkflows')]");
$this->assertSession()->elementTextContains('xpath',"//div[@role='status' and h2[text()='Status message']]",'2 modules have been installed: Content Moderation, Workflows.');
$this->assertSession()->elementExists('xpath',"//div[@role='status' and h2[text()='Status message']]//a[contains(@href, '/admin/people/permissions/module/content_moderation%2Cworkflows')]");