/**
* Asserts that Off-Canvas block form is valid.
*/
protected function assertOffCanvasBlockFormIsValid() { $web_assert =
$this->
assertSession();
// Confirm that Block title display label has been changed.
$web_assert->
elementTextContains('css', '.form-item-settings-label-display label', 'Display block title'
);
// Confirm Block title label is shown if checkbox is checked.
if ($this->
getSession()->
getPage()->
find('css', 'input[name="settings[label_display]"]'
)->
isChecked()) { $this->
assertTrue($this->
isLabelInputVisible(), 'Label is visible'
);
$web_assert->
elementTextContains('css', '.form-item-settings-label label', 'Block title'
);
} else { $this->
assertFalse($this->
isLabelInputVisible(), 'Label is not visible'
);
} // Check that common block form elements exist.
$web_assert->
elementExists('css',
static::LABEL_INPUT_SELECTOR
);
$web_assert->
elementExists('css', 'input[data-drupal-selector="edit-settings-label-display"]'
);
// Check that advanced block form elements do not exist.
$web_assert->
elementNotExists('css', 'input[data-drupal-selector="edit-visibility-request-path-pages"]'
);