function UiPageTest::testRuleStatusOperations

Tests that enabling and disabling a rule works.

File

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

Class

UiPageTest
Tests that the Reaction Rules list builder pages work.

Namespace

Drupal\Tests\rules\Functional

Code

public function testRuleStatusOperations() {
    // Setup an active rule.
    $this->testCreateReactionRule();
    $this->drupalGet('admin/config/workflow/rules');
    
    /** @var \Drupal\Tests\WebAssert $assert */
    $assert = $this->assertSession();
    // Test disabling.
    $this->clickLink('Disable');
    $assert->pageTextContains('The reaction rule Test rule has been disabled.');
    // Test enabling.
    $this->clickLink('Enable');
    $assert->pageTextContains('The reaction rule Test rule has been enabled.');
}