You are here

RavenTest.php in Raven: Sentry Integration 8.2

File

tests/src/FunctionalJavascript/RavenTest.php
View source
<?php

namespace Drupal\Tests\raven\FunctionalJavascript;

use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;

/**
 * Tests Raven module.
 *
 * @group raven
 */
class RavenTest extends WebDriverTestBase {
  use StringTranslationTrait;

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';

  /**
   * Modules to install.
   *
   * @var array
   */
  public static $modules = [
    'raven',
  ];

  /**
   * Tests Sentry browser client configuration UI.
   */
  public function testRavenJavascriptConfig() {
    $admin_user = $this
      ->drupalCreateUser([
      'administer site configuration',
      'send javascript errors to sentry',
    ]);
    $this
      ->drupalLogin($admin_user);
    $this
      ->drupalGet('admin/config/development/logging');
    $this
      ->submitForm([
      'raven[js][javascript_error_handler]' => TRUE,
    ], $this
      ->t('Save configuration'));
  }

}

Classes

Namesort descending Description
RavenTest Tests Raven module.