Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / metatag / metatag_views / tests / src / Functional / MetatagViewsBasicsTest.php
index 3415896930680533c3f105018fc8ab5b82084c21..3aa3e80aac8cc1d24ca5141626c42f81bc888977 100644 (file)
@@ -3,7 +3,6 @@
 namespace Drupal\Tests\metatag_views\Functional;
 
 use Drupal\Tests\BrowserTestBase;
-use Drupal\Tests\metatag\Functional\MetatagHelperTrait;
 
 /**
  * Confirm the defaults functionality works.
@@ -12,7 +11,8 @@ use Drupal\Tests\metatag\Functional\MetatagHelperTrait;
  */
 class MetatagViewsBasicsTest extends BrowserTestBase {
 
-  use MetatagHelperTrait;
+  // Contains helper methods.
+  use \Drupal\Tests\metatag\Functional\MetatagHelperTrait;
 
   /**
    * {@inheritdoc}
@@ -109,7 +109,7 @@ class MetatagViewsBasicsTest extends BrowserTestBase {
     $this->assertText('Configure the meta tags below.');
     $this->assertFieldByName('title');
     $this->assertFieldByName('description');
-    $this->assertFieldByName('op');//, 'Apply');
+    $this->assertFieldByName('op');
     $edit = [
       'title' => 'Metatag title',
       'description' => 'Metatag description.',
@@ -120,20 +120,22 @@ class MetatagViewsBasicsTest extends BrowserTestBase {
     $this->assertText('Overridden');
 
     // @todo Confirm there's now a "save" button.
-    // $this->assertFieldByName('op');//, 'Save');
-
     // Save the changes.
     $edit = [];
     $this->drupalPostForm(NULL, $edit, 'Save');
 
     // @todo Confirm the page saved.
-
     // Load the archives page again.
     $this->drupalGet('/archive');
     $this->assertResponse(200);
 
     // Confirm what the page title looks like now.
     $this->assertTitle('Metatag title');
+
+    // Load the Metatag admin page to confirm it still works.
+    $this->drupalGet('admin/config/search/metatag');
+    $this->assertResponse(200);
+    $this->assertText('Add default meta tags');
   }
 
 }