function UiPageTest::testDeleteExpressionInRule

Tests that deleting an expression from a rule works.

File

tests/src/Functional/UiPageTest.php, line 300

Class

UiPageTest
Tests that the Reaction Rules list builder pages work.

Namespace

Drupal\Tests\rules\Functional

Code

public function testDeleteExpressionInRule() {
    // Setup a rule with one condition.
    $this->testCreateReactionRule();
    
    /** @var \Drupal\Tests\WebAssert $assert */
    $assert = $this->assertSession();
    $this->clickLink('Delete');
    $assert->pageTextContains('Are you sure you want to delete Node is promoted from Test rule?');
    $this->pressButton('Delete');
    $assert->pageTextContains('You have unsaved changes.');
    $this->pressButton('Save');
    $assert->pageTextContains('Reaction rule Test rule has been updated. ');
}