function RulesComponentListBuilderTest::testDeleteExpressionInComponent
Tests that deleting an expression from a rule works.
File
-
tests/
src/ Functional/ RulesComponentListBuilderTest.php, line 125
Class
- RulesComponentListBuilderTest
- Tests that the Rules Component list builder pages work.
Namespace
Drupal\Tests\rules\FunctionalCode
public function testDeleteExpressionInComponent() {
// Setup a rule with one condition.
$this->testCreateRulesComponent();
/** @var \Drupal\Tests\WebAssert $assert */
$assert = $this->assertSession();
$this->clickLink('Delete');
$assert->pageTextContains('Are you sure you want to delete User is blocked from Test component?');
$this->pressButton('Delete');
$assert->pageTextContains('You have unsaved changes.');
$this->pressButton('Save');
$assert->pageTextContains('Rule component Test component has been updated. ');
}