Verified Commit 0a03e7b1 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3272336 by danflanagan8: File tests should not rely on Classy

parent e58aed3e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ class FileFieldWidgetTest extends FileFieldTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'classy';
  protected $defaultTheme = 'stark';

  /**
   * {@inheritdoc}
@@ -395,7 +395,7 @@ public function testWidgetElement() {
    $html_name = str_replace('_', '-', $field_name);
    $this->createFileField($field_name, 'node', 'article', ['cardinality' => FieldStorageConfig::CARDINALITY_UNLIMITED]);
    $file = $this->getTestFile('text');
    $xpath = "//details[@data-drupal-selector='edit-$html_name']/div[@class='details-wrapper']/table";
    $xpath = "//details[@data-drupal-selector='edit-$html_name']/table";

    $this->drupalGet('node/add/article');

+3 −3
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ class FileListingTest extends FileFieldTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'classy';
  protected $defaultTheme = 'stark';

  /**
   * An authenticated user.
@@ -119,8 +119,8 @@ public function testFileListingPages() {
      $this->assertSession()->linkByHrefExists($file->createFileUrl());
      $this->assertSession()->linkByHrefExists('admin/content/files/usage/' . $file->id());
    }
    $this->assertSession()->elementTextNotContains('css', 'table.views-table', 'Temporary');
    $this->assertSession()->elementTextContains('css', 'table.views-table', 'Permanent');
    $this->assertSession()->elementTextNotContains('css', '.views-element-container table', 'Temporary');
    $this->assertSession()->elementTextContains('css', '.views-element-container table', 'Permanent');

    // Use one file two times and check usage information.
    $orphaned_file = $nodes[1]->file->target_id;
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ class SaveUploadFormTest extends FileManagedTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'classy';
  protected $defaultTheme = 'stark';

  /**
   * An image file path for uploading.
@@ -570,7 +570,7 @@ public function testCombinedErrorMessages() {
    $this->assertSession()->pageTextContains("Epic upload FAIL!");

    // Search for combined error message followed by a formatted list of messages.
    $this->assertSession()->responseContains('One or more files could not be uploaded.<div class="item-list">');
    $this->assertSession()->responseContains('One or more files could not be uploaded.<ul>');
  }

  /**