3 namespace Drupal\comment\Tests\Views;
6 * Tests comment operations.
10 class CommentOperationsTest extends CommentTestBase {
13 * Views used by this test.
17 public static $testViews = ['test_comment_operations'];
20 * Test the operations field plugin.
22 public function testCommentOperations() {
23 $admin_account = $this->drupalCreateUser(['administer comments']);
24 $this->drupalLogin($admin_account);
25 $this->drupalGet('test-comment-operations');
26 $this->assertResponse(200);
27 $operation = $this->cssSelect('.views-field-operations li.edit a');
28 $this->assertEqual(count($operation), 1, 'Found edit operation for comment.');
29 $operation = $this->cssSelect('.views-field-operations li.delete a');
30 $this->assertEqual(count($operation), 1, 'Found delete operation for comment.');