You are here

private function SaveSettingsTest::assertElementsOnBuildForm in Webform CiviCRM Integration 8.5

Check if element is present or not on the webform build page.

2 calls to SaveSettingsTest::assertElementsOnBuildForm()
SaveSettingsTest::testAddFields in tests/src/FunctionalJavascript/SaveSettingsTest.php
Add fields on the webform.
SaveSettingsTest::testDeleteField in tests/src/FunctionalJavascript/SaveSettingsTest.php
Delete fields on the webform.

File

tests/src/FunctionalJavascript/SaveSettingsTest.php, line 117

Class

SaveSettingsTest
Tests settings on the webform.

Namespace

Drupal\Tests\webform_civicrm\FunctionalJavascript

Code

private function assertElementsOnBuildForm($elements, $negate = FALSE) {
  $this
    ->drupalGet($this->webform
    ->toUrl('edit-form'));
  foreach ($elements as $element) {
    if ($negate) {
      $this
        ->assertSession()
        ->pageTextNotContains($element);
    }
    else {
      $this
        ->assertSession()
        ->pageTextContains($element);
    }
  }
}