Add test assertion for quick form help text

This commit is contained in:
Paul Weidner 2023-08-11 12:08:56 -07:00 committed by Michael Stenta
parent 8ae1c6dd1f
commit 89be8e6359
1 changed files with 14 additions and 1 deletions

View File

@ -20,8 +20,19 @@ class QuickFormTest extends FarmBrowserTestBase {
*/
protected static $modules = [
'farm_quick_test',
'help',
];
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
// Add the help block, so we can test help text.
$this->drupalPlaceBlock('help_block');
}
/**
* Test quick forms.
*/
@ -67,9 +78,11 @@ class QuickFormTest extends FarmBrowserTestBase {
$this->assertSession()->pageTextContains($this->t('Test configurable quick form 2'));
$this->assertSession()->pageTextNotContains($this->t('Test requiresEntity quick form'));
// Go to the test quick form and confirm that the test field is visible.
// Go to the test quick form and confirm that the help text and test field
// is visible.
$this->drupalGet('quick/test');
$this->assertSession()->statusCodeEquals(200);
$this->assertSession()->pageTextContains($this->t('Test quick form help text.'));
$this->assertSession()->pageTextContains($this->t('Test field'));
// Go to the default configurable_test quick form and confirm access is