Commit 4b43d82a authored by catch's avatar catch
Browse files

Issue #3304378 by bnjmnm: Core FunctionalJavascript tests should not depend on Classy or Starterkit

(cherry picked from commit 0cbb0a30)
parent 54e874bc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ class AjaxFormPageCacheTest extends WebDriverTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'starterkit_theme';
  protected $defaultTheme = 'stark';

  /**
   * {@inheritdoc}
@@ -125,7 +125,7 @@ public function testAjaxElementValidation() {
    // When the AJAX command updates the DOM a <ul> unsorted list
    // "message__list" structure will appear on the page echoing back the
    // "some dumb text" message.
    $placeholder = $this->assertSession()->waitForElement('css', "ul.messages__list li.messages__item em:contains('some dumb text')");
    $placeholder = $this->assertSession()->waitForElement('css', "[aria-label='Status message'] > ul > li > em:contains('some dumb text')");
    $this->assertNotNull($placeholder, 'Message structure containing input data located.');
  }

+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ class DialogTest extends WebDriverTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'starterkit_theme';
  protected $defaultTheme = 'stark';

  /**
   * Tests sending non-JS and AJAX requests to open and manipulate modals.
+3 −3
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ class ElementValidationTest extends WebDriverTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'starterkit_theme';
  protected $defaultTheme = 'stark';

  /**
   * Tries to post an Ajax change to a form that has a validated element.
@@ -40,7 +40,7 @@ public function testAjaxElementValidation() {
    // When the AJAX command updates the DOM a <ul> unsorted list
    // "message__list" structure will appear on the page echoing back the
    // "some dumb text" message.
    $placeholder_text = $assert->waitForElement('css', "ul.messages__list li.messages__item em:contains('some dumb text')");
    $placeholder_text = $assert->waitForElement('css', "[aria-label='Status message'] > ul > li > em:contains('some dumb text')");
    $this->assertNotNull($placeholder_text, 'A callback successfully echoed back a string.');

    $this->drupalGet('ajax_validation_test');
@@ -51,7 +51,7 @@ public function testAjaxElementValidation() {
    // The AJAX request/response will complete successfully when an
    // InsertCommand injects a message with a placeholder element into the DOM
    // with the submitted number.
    $placeholder_number = $assert->waitForElement('css', "ul.messages__list li.messages__item em:contains('12345')");
    $placeholder_number = $assert->waitForElement('css', "[aria-label='Status message'] > ul > li > em:contains('12345')");
    $this->assertNotNull($placeholder_number, 'A callback successfully echoed back a number.');
  }