Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / block / tests / src / Functional / BlockTest.php
index 53b48662cd234f1d22ffcfef4914d12a201b901e..9fb33573c46cbf4bc42e3d0c68abc9093c145c09 100644 (file)
@@ -238,6 +238,30 @@ class BlockTest extends BlockTestBase {
     $this->assertNoRaw($block->id());
   }
 
+  /**
+   * Tests the block operation links.
+   */
+  public function testBlockOperationLinks() {
+    $this->drupalGet('admin/structure/block');
+    // Go to the select block form.
+    $this->clickLink('Place block');
+    // Select the first available block.
+    $this->clickLink('Place block');
+    // Finally place the block
+    $this->submitForm([], 'Save block');
+
+    $url = $this->getUrl();
+    $parsed = parse_url($url);
+    $this->assertContains('block-placement', $parsed['query']);
+
+    $this->clickLink('Remove');
+    $this->submitForm([], 'Remove');
+
+    $url = $this->getUrl();
+    $parsed = parse_url($url);
+    $this->assertTrue(empty($parsed['query']));
+  }
+
   /**
    * Tests that the block form has a theme selector when not passed via the URL.
    */