'Rules UI Minimal Profile Tests ', 'description' => 'Tests UI support for minimal profile.', 'group' => 'Rules', ); } /** * Overrides DrupalWebTestCase::setUp(). */ protected function setUp() { parent::setUp('rules', 'rules_admin'); RulesLog::logger()->clear(); variable_set('rules_debug_log', TRUE); } /** * Tests node event UI without content types. * * @see https://www.drupal.org/project/rules/issues/2267341 */ public function testNodeEventUi() { // Create a simple user account with permission to create a rule. $user = $this->drupalCreateUser(array('access administration pages', 'administer rules')); $this->drupalLogin($user); $this->drupalGet('admin/config/workflow/rules/reaction/add'); $edit = array( 'settings[label]' => 'Test node event', 'settings[name]' => 'test_node_event', 'event' => 'node_insert', ); $this->drupalPostAJAX(NULL, $edit, 'event'); $this->assertText('Restrict by type', 'Restrict by type selection is visible.'); $this->drupalPost(NULL, $edit, 'Save'); $this->assertText('Editing reaction rule', 'Rule edit page is shown.'); } }