Loading core/modules/block/tests/src/Functional/BlockTest.php +3 −1 Original line number Diff line number Diff line Loading @@ -252,7 +252,9 @@ public function testBlock() { $this->assertSession()->pageTextContains('The block ' . $block['settings[label]'] . ' has been removed from the Footer region.'); // Test deleting a block via "Configure block" link. $block = $this->drupalPlaceBlock('system_powered_by_block'); $block = $this->drupalPlaceBlock('system_powered_by_block', [ 'region' => 'left_sidebar', ]); $this->drupalGet('admin/structure/block/manage/' . $block->id(), ['query' => ['destination' => 'admin']]); $this->clickLink('Remove block'); $this->assertSession()->pageTextContains('Are you sure you want to remove the block ' . $block->label() . ' from the Left sidebar region?'); Loading core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php +5 −1 Original line number Diff line number Diff line Loading @@ -264,7 +264,11 @@ public function testViewsBlockForm() { */ public function testBlockRendering() { // Create a block and set a custom title. $block = $this->drupalPlaceBlock('views_block:test_view_block-block_1', ['label' => 'test_view_block-block_1:1', 'views_label' => 'Custom title']); $block = $this->drupalPlaceBlock('views_block:test_view_block-block_1', [ 'label' => 'test_view_block-block_1:1', 'views_label' => 'Custom title', 'region' => 'sidebar_first', ]); $this->drupalGet(''); $this->assertSession()->elementTextEquals('xpath', '//div[contains(@class, "region-sidebar-first")]/div[contains(@class, "block-views")]/h2', 'Custom title'); Loading core/modules/block/tests/src/Traits/BlockCreationTrait.php +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ protected function placeBlock($plugin_id, array $settings = []) { $config = \Drupal::configFactory(); $settings += [ 'plugin' => $plugin_id, 'region' => 'sidebar_first', 'region' => 'content', 'id' => strtolower($this->randomMachineName(8)), 'theme' => $config->get('system.theme')->get('default'), 'label' => $this->randomMachineName(8), Loading core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php +9 −9 Original line number Diff line number Diff line Loading @@ -255,7 +255,7 @@ public function testLanguageIndependentContentModeration() { // Publish the Italian draft (revision 6). $this->drupalGet($translate_path); $this->clickLink('Edit', 2); $this->clickLink('Edit', 3); $this->submitNodeForm('Test 1.6 IT', 'published'); $this->assertNotLatestVersionPage($it_node); $this->assertNoModerationForm($node); Loading @@ -263,7 +263,7 @@ public function testLanguageIndependentContentModeration() { // Publish the French draft (revision 7). $this->drupalGet($translate_path); $this->clickLink('Edit', 1); $this->clickLink('Edit', 2); $this->submitNodeForm('Test 1.7 FR', 'published'); $this->assertNotLatestVersionPage($fr_node); $this->assertNoModerationForm($node); Loading @@ -271,7 +271,7 @@ public function testLanguageIndependentContentModeration() { // Create an Italian draft (revision 8). $this->drupalGet($translate_path); $this->clickLink('Edit', 2); $this->clickLink('Edit', 3); $this->submitNodeForm('Test 1.8 IT', 'draft'); $this->assertLatestVersionPage($it_node); $this->assertNoModerationForm($node); Loading @@ -279,7 +279,7 @@ public function testLanguageIndependentContentModeration() { // Create a French draft (revision 9). $this->drupalGet($translate_path); $this->clickLink('Edit', 1); $this->clickLink('Edit', 2); $this->submitNodeForm('Test 1.9 FR', 'draft'); $this->assertLatestVersionPage($fr_node); $this->assertNoModerationForm($node); Loading Loading @@ -326,7 +326,7 @@ public function testLanguageIndependentContentModeration() { // Publish the Italian draft (revision 5). $this->drupalGet($translate_path); $this->clickLink('Edit', 2); $this->clickLink('Edit', 3); $this->submitNodeForm('Test 2.5 IT', 'published'); $this->assertNotLatestVersionPage($it_node2); $this->assertNoModerationForm($node2); Loading @@ -334,7 +334,7 @@ public function testLanguageIndependentContentModeration() { // Publish the French draft (revision 6). $this->drupalGet($translate_path); $this->clickLink('Edit', 1); $this->clickLink('Edit', 2); $this->submitNodeForm('Test 2.6 FR', 'published'); $this->assertNotLatestVersionPage($fr_node2); $this->assertNoModerationForm($node2); Loading @@ -358,7 +358,7 @@ public function testLanguageIndependentContentModeration() { // Create an Italian draft (revision 7). $this->drupalGet($translate_path); $this->clickLink('Edit', 2); $this->clickLink('Edit', 3); $this->submitNodeForm('Test 2.7 IT', 'draft'); $this->assertLatestVersionPage($it_node2); $this->assertNoModerationForm($node2); Loading @@ -366,7 +366,7 @@ public function testLanguageIndependentContentModeration() { // Create a French draft (revision 8). $this->drupalGet($translate_path); $this->clickLink('Edit', 1); $this->clickLink('Edit', 2); $this->submitNodeForm('Test 2.8 FR', 'draft'); $this->assertLatestVersionPage($fr_node2); $this->assertNoModerationForm($node2); Loading Loading @@ -403,7 +403,7 @@ public function testLanguageIndependentContentModeration() { // Publish the French draft (revision 4). $this->drupalGet($translate_path); $this->clickLink('Edit', 1); $this->clickLink('Edit', 2); $this->submitNodeForm('Test 3.4 FR', 'published'); $this->assertNotLatestVersionPage($fr_node3); $this->assertModerationForm($node3); Loading core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public function testLanguageChange() { $this->clickLink('Translate'); // Edit English translation. $this->clickLink('Edit'); $this->clickLink('Edit', 1); // Upload and image after changing the node language. $images = $this->drupalGetTestFiles('image')[1]; $edit = [ Loading Loading
core/modules/block/tests/src/Functional/BlockTest.php +3 −1 Original line number Diff line number Diff line Loading @@ -252,7 +252,9 @@ public function testBlock() { $this->assertSession()->pageTextContains('The block ' . $block['settings[label]'] . ' has been removed from the Footer region.'); // Test deleting a block via "Configure block" link. $block = $this->drupalPlaceBlock('system_powered_by_block'); $block = $this->drupalPlaceBlock('system_powered_by_block', [ 'region' => 'left_sidebar', ]); $this->drupalGet('admin/structure/block/manage/' . $block->id(), ['query' => ['destination' => 'admin']]); $this->clickLink('Remove block'); $this->assertSession()->pageTextContains('Are you sure you want to remove the block ' . $block->label() . ' from the Left sidebar region?'); Loading
core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php +5 −1 Original line number Diff line number Diff line Loading @@ -264,7 +264,11 @@ public function testViewsBlockForm() { */ public function testBlockRendering() { // Create a block and set a custom title. $block = $this->drupalPlaceBlock('views_block:test_view_block-block_1', ['label' => 'test_view_block-block_1:1', 'views_label' => 'Custom title']); $block = $this->drupalPlaceBlock('views_block:test_view_block-block_1', [ 'label' => 'test_view_block-block_1:1', 'views_label' => 'Custom title', 'region' => 'sidebar_first', ]); $this->drupalGet(''); $this->assertSession()->elementTextEquals('xpath', '//div[contains(@class, "region-sidebar-first")]/div[contains(@class, "block-views")]/h2', 'Custom title'); Loading
core/modules/block/tests/src/Traits/BlockCreationTrait.php +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ protected function placeBlock($plugin_id, array $settings = []) { $config = \Drupal::configFactory(); $settings += [ 'plugin' => $plugin_id, 'region' => 'sidebar_first', 'region' => 'content', 'id' => strtolower($this->randomMachineName(8)), 'theme' => $config->get('system.theme')->get('default'), 'label' => $this->randomMachineName(8), Loading
core/modules/content_moderation/tests/src/Functional/ModerationLocaleTest.php +9 −9 Original line number Diff line number Diff line Loading @@ -255,7 +255,7 @@ public function testLanguageIndependentContentModeration() { // Publish the Italian draft (revision 6). $this->drupalGet($translate_path); $this->clickLink('Edit', 2); $this->clickLink('Edit', 3); $this->submitNodeForm('Test 1.6 IT', 'published'); $this->assertNotLatestVersionPage($it_node); $this->assertNoModerationForm($node); Loading @@ -263,7 +263,7 @@ public function testLanguageIndependentContentModeration() { // Publish the French draft (revision 7). $this->drupalGet($translate_path); $this->clickLink('Edit', 1); $this->clickLink('Edit', 2); $this->submitNodeForm('Test 1.7 FR', 'published'); $this->assertNotLatestVersionPage($fr_node); $this->assertNoModerationForm($node); Loading @@ -271,7 +271,7 @@ public function testLanguageIndependentContentModeration() { // Create an Italian draft (revision 8). $this->drupalGet($translate_path); $this->clickLink('Edit', 2); $this->clickLink('Edit', 3); $this->submitNodeForm('Test 1.8 IT', 'draft'); $this->assertLatestVersionPage($it_node); $this->assertNoModerationForm($node); Loading @@ -279,7 +279,7 @@ public function testLanguageIndependentContentModeration() { // Create a French draft (revision 9). $this->drupalGet($translate_path); $this->clickLink('Edit', 1); $this->clickLink('Edit', 2); $this->submitNodeForm('Test 1.9 FR', 'draft'); $this->assertLatestVersionPage($fr_node); $this->assertNoModerationForm($node); Loading Loading @@ -326,7 +326,7 @@ public function testLanguageIndependentContentModeration() { // Publish the Italian draft (revision 5). $this->drupalGet($translate_path); $this->clickLink('Edit', 2); $this->clickLink('Edit', 3); $this->submitNodeForm('Test 2.5 IT', 'published'); $this->assertNotLatestVersionPage($it_node2); $this->assertNoModerationForm($node2); Loading @@ -334,7 +334,7 @@ public function testLanguageIndependentContentModeration() { // Publish the French draft (revision 6). $this->drupalGet($translate_path); $this->clickLink('Edit', 1); $this->clickLink('Edit', 2); $this->submitNodeForm('Test 2.6 FR', 'published'); $this->assertNotLatestVersionPage($fr_node2); $this->assertNoModerationForm($node2); Loading @@ -358,7 +358,7 @@ public function testLanguageIndependentContentModeration() { // Create an Italian draft (revision 7). $this->drupalGet($translate_path); $this->clickLink('Edit', 2); $this->clickLink('Edit', 3); $this->submitNodeForm('Test 2.7 IT', 'draft'); $this->assertLatestVersionPage($it_node2); $this->assertNoModerationForm($node2); Loading @@ -366,7 +366,7 @@ public function testLanguageIndependentContentModeration() { // Create a French draft (revision 8). $this->drupalGet($translate_path); $this->clickLink('Edit', 1); $this->clickLink('Edit', 2); $this->submitNodeForm('Test 2.8 FR', 'draft'); $this->assertLatestVersionPage($fr_node2); $this->assertNoModerationForm($node2); Loading Loading @@ -403,7 +403,7 @@ public function testLanguageIndependentContentModeration() { // Publish the French draft (revision 4). $this->drupalGet($translate_path); $this->clickLink('Edit', 1); $this->clickLink('Edit', 2); $this->submitNodeForm('Test 3.4 FR', 'published'); $this->assertNotLatestVersionPage($fr_node3); $this->assertModerationForm($node3); Loading
core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public function testLanguageChange() { $this->clickLink('Translate'); // Edit English translation. $this->clickLink('Edit'); $this->clickLink('Edit', 1); // Upload and image after changing the node language. $images = $this->drupalGetTestFiles('image')[1]; $edit = [ Loading