Commit a30b87a3 authored by catch's avatar catch
Browse files

Issue #3272537 by danflanagan8: Help and Help Topics tests should not rely on Classy

(cherry picked from commit 823a7afe)
parent 0e319b4e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -51,11 +51,11 @@ protected function setUp(): void {
  public function testExperimentalHelp() {
    $this->drupalLogin($this->adminUser);
    $this->drupalGet('admin/help/experimental_module_test');
    $this->assertSession()->pageTextContains('This module is experimental.');
    $this->assertSession()->statusMessageContains('This module is experimental.', 'warning');

    // Regular modules should not display the message.
    $this->drupalGet('admin/help/help_page_test');
    $this->assertSession()->pageTextNotContains('This module is experimental.');
    $this->assertSession()->statusMessageNotContains('This module is experimental.');

    // Ensure the actual help page is displayed to avoid a false positive.
    $this->assertSession()->statusCodeEquals(200);
+5 −5
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ class HelpTopicSearchTest extends HelpTopicTranslatedTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'classy';
  protected $defaultTheme = 'stark';

  /**
   * {@inheritdoc}
@@ -65,7 +65,7 @@ protected function setUp(): void {
    $this->drupalGet('search/help');
    $this->submitForm(['keys' => 'notawordenglish'], 'Search');
    $this->assertSearchResultsCount(0);
    $this->assertSession()->pageTextContains('is not fully indexed');
    $this->assertSession()->statusMessageContains('Help search is not fully indexed', 'warning');

    // Run cron until the topics are fully indexed, with a limit of 100 runs
    // to avoid infinite loops.
@@ -85,7 +85,7 @@ protected function setUp(): void {
    $this->drupalGet('search/help');
    $this->submitForm(['keys' => 'notawordenglish'], 'Search');
    $this->assertSearchResultsCount(1);
    $this->assertSession()->pageTextNotContains('is not fully indexed');
    $this->assertSession()->statusMessageNotContains('Help search is not fully indexed');
  }

  /**
@@ -258,7 +258,7 @@ public function testUninstall() {
    $this->drupalGet('admin/modules/uninstall');
    $this->submitForm($edit, 'Uninstall');
    $this->submitForm([], 'Uninstall');
    $this->assertSession()->pageTextContains('The selected modules have been uninstalled.');
    $this->assertSession()->statusMessageContains('The selected modules have been uninstalled.', 'status');
    $this->drupalGet('admin/help');
    $this->assertSession()->statusCodeEquals(200);
  }
@@ -275,7 +275,7 @@ public function testUninstallSearch() {
    $this->drupalGet('admin/modules/uninstall');
    $this->submitForm($edit, 'Uninstall');
    $this->submitForm([], 'Uninstall');
    $this->assertSession()->pageTextContains('The selected modules have been uninstalled.');
    $this->assertSession()->statusMessageContains('The selected modules have been uninstalled.', 'status');
    $this->drupalGet('admin/help');
    $this->assertSession()->statusCodeEquals(200);

+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ class HelpTopicsSyntaxTest extends BrowserTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'classy';
  protected $defaultTheme = 'stark';

  /**
   * Tests that all Core help topics can be rendered and have good syntax.