Verified Commit e58aed3e authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3272543 by danflanagan8, larowlan: History tests should not rely on Classy

parent 3eedc962
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -40,10 +40,10 @@ protected function setUp($import_test_views = TRUE): void {
    $this->installEntitySchema('node');
    $this->installEntitySchema('user');
    $this->installSchema('history', ['history']);
    // Use classy theme because its marker is wrapped in a span so it can be
    // easily targeted with xpath.
    \Drupal::service('theme_installer')->install(['classy']);
    \Drupal::theme()->setActiveTheme(\Drupal::service('theme.initialization')->initTheme('classy'));
    // Use history_test_theme because its marker is wrapped in a span so it can
    // be easily targeted with xpath.
    \Drupal::service('theme_installer')->install(['history_test_theme']);
    \Drupal::theme()->setActiveTheme(\Drupal::service('theme.initialization')->initTheme('history_test_theme'));
  }

  /**
+5 −0
Original line number Diff line number Diff line
name: 'History Test Theme'
type: theme
description: 'Theme for history tests.'
version: VERSION
base theme: stark
+20 −0
Original line number Diff line number Diff line
{#
/**
 * @file
 * Theme override for a marker for new or updated content.
 *
 * Available variables:
 * - status: Number representing the marker status to display. Use the constants
 *   below for comparison:
 *   - MARK_NEW
 *   - MARK_UPDATED
 *   - MARK_READ
 */
#}
{% if logged_in %}
  {% if status is constant('MARK_NEW') %}
    <span class="marker">{{ 'New'|t }}</span>
  {% elseif status is constant('MARK_UPDATED') %}
    <span class="marker">{{ 'Updated'|t }}</span>
  {% endif %}
{% endif %}