Loading core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -48,9 +48,9 @@ public function openImportForm() { $this->drupalGet('admin/config/services/aggregator/add/opml'); $this->assertText('A single OPML document may contain many feeds.', 'Found OPML help text.'); // Ensure that the file upload, remote URL, and refresh fields exist. $this->assertField('files[upload]'); $this->assertField('remote'); $this->assertField('refresh'); $this->assertSession()->fieldExists('files[upload]'); $this->assertSession()->fieldExists('remote'); $this->assertSession()->fieldExists('refresh'); } /** Loading core/modules/block/tests/src/Functional/BlockLanguageTest.php +4 −4 Original line number Diff line number Diff line Loading @@ -56,8 +56,8 @@ public function testLanguageBlockVisibility() { $this->drupalGet('admin/structure/block/add/system_powered_by_block' . '/' . $default_theme); // Ensure that the language visibility field is visible without a type // setting. $this->assertField('visibility[language][langcodes][en]'); $this->assertNoField('visibility[language][context_mapping][language]'); $this->assertSession()->fieldExists('visibility[language][langcodes][en]'); $this->assertSession()->fieldNotExists('visibility[language][context_mapping][language]'); // Enable a standard block and set the visibility setting for one language. $edit = [ Loading Loading @@ -139,8 +139,8 @@ public function testMultipleLanguageTypes() { // Check if the visibility setting is available with a type setting. $default_theme = $this->config('system.theme')->get('default'); $this->drupalGet('admin/structure/block/add/system_powered_by_block' . '/' . $default_theme); $this->assertField('visibility[language][langcodes][en]'); $this->assertField('visibility[language][context_mapping][language]'); $this->assertSession()->fieldExists('visibility[language][langcodes][en]'); $this->assertSession()->fieldExists('visibility[language][context_mapping][language]'); // Enable a standard block and set visibility to French only. $block_id = strtolower($this->randomMachineName(8)); Loading core/modules/block/tests/src/Functional/BlockUiTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -121,11 +121,11 @@ public function testBlockAdminUiPage() { $element = $this->xpath('//*[@id="blocks"]/tbody/tr[' . $values['tr'] . ']/td[1]/text()'); $this->assertEquals($element[0]->getText(), $label, 'The "' . $label . '" block title is set inside the ' . $values['settings']['region'] . ' region.'); // Look for a test block region select form element. $this->assertField('blocks[' . $values['settings']['id'] . '][region]'); $this->assertSession()->fieldExists('blocks[' . $values['settings']['id'] . '][region]'); // Move the test block to the header region. $edit['blocks[' . $values['settings']['id'] . '][region]'] = 'header'; // Look for a test block weight select form element. $this->assertField('blocks[' . $values['settings']['id'] . '][weight]'); $this->assertSession()->fieldExists('blocks[' . $values['settings']['id'] . '][weight]'); // Change the test block's weight. $edit['blocks[' . $values['settings']['id'] . '][weight]'] = $values['test_weight']; } Loading core/modules/comment/tests/src/Functional/CommentBookTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public function testBookCommentPrint() { $this->assertText($comment_body, 'Comment body found'); $this->assertText(t('Add new comment'), 'Comment form found'); // Ensure that the comment form subject field exists. $this->assertField('subject[0][value]'); $this->assertSession()->fieldExists('subject[0][value]'); $this->drupalGet('book/export/html/' . $book_node->id()); Loading @@ -83,7 +83,7 @@ public function testBookCommentPrint() { $this->assertNoText(t('Add new comment'), 'Comment form not found'); // Verify that the comment form subject field is not found. $this->assertNoField('subject[0][value]'); $this->assertSession()->fieldNotExists('subject[0][value]'); } } core/modules/comment/tests/src/Functional/CommentInterfaceTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -179,14 +179,14 @@ public function testCommentInterface() { $this->assertNotNull($this->node, 'Article node created.'); $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment'); $this->assertSession()->statusCodeEquals(403); $this->assertNoField('edit-comment'); $this->assertSession()->fieldNotExists('edit-comment'); // Attempt to post to node with read-only comments. $this->node = $this->drupalCreateNode(['type' => 'article', 'promote' => 1, 'comment' => [['status' => CommentItemInterface::CLOSED]]]); $this->assertNotNull($this->node, 'Article node created.'); $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment'); $this->assertSession()->statusCodeEquals(403); $this->assertNoField('edit-comment'); $this->assertSession()->fieldNotExists('edit-comment'); // Attempt to post to node with comments enabled (check field names etc). $this->node = $this->drupalCreateNode(['type' => 'article', 'promote' => 1, 'comment' => [['status' => CommentItemInterface::OPEN]]]); Loading @@ -194,7 +194,7 @@ public function testCommentInterface() { $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment'); $this->assertNoText('This discussion is closed', 'Posting to node with comments enabled'); // Ensure that the comment body field exists. $this->assertField('edit-comment-body-0-value'); $this->assertSession()->fieldExists('edit-comment-body-0-value'); // Delete comment and make sure that reply is also removed. $this->drupalLogout(); Loading Loading
core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -48,9 +48,9 @@ public function openImportForm() { $this->drupalGet('admin/config/services/aggregator/add/opml'); $this->assertText('A single OPML document may contain many feeds.', 'Found OPML help text.'); // Ensure that the file upload, remote URL, and refresh fields exist. $this->assertField('files[upload]'); $this->assertField('remote'); $this->assertField('refresh'); $this->assertSession()->fieldExists('files[upload]'); $this->assertSession()->fieldExists('remote'); $this->assertSession()->fieldExists('refresh'); } /** Loading
core/modules/block/tests/src/Functional/BlockLanguageTest.php +4 −4 Original line number Diff line number Diff line Loading @@ -56,8 +56,8 @@ public function testLanguageBlockVisibility() { $this->drupalGet('admin/structure/block/add/system_powered_by_block' . '/' . $default_theme); // Ensure that the language visibility field is visible without a type // setting. $this->assertField('visibility[language][langcodes][en]'); $this->assertNoField('visibility[language][context_mapping][language]'); $this->assertSession()->fieldExists('visibility[language][langcodes][en]'); $this->assertSession()->fieldNotExists('visibility[language][context_mapping][language]'); // Enable a standard block and set the visibility setting for one language. $edit = [ Loading Loading @@ -139,8 +139,8 @@ public function testMultipleLanguageTypes() { // Check if the visibility setting is available with a type setting. $default_theme = $this->config('system.theme')->get('default'); $this->drupalGet('admin/structure/block/add/system_powered_by_block' . '/' . $default_theme); $this->assertField('visibility[language][langcodes][en]'); $this->assertField('visibility[language][context_mapping][language]'); $this->assertSession()->fieldExists('visibility[language][langcodes][en]'); $this->assertSession()->fieldExists('visibility[language][context_mapping][language]'); // Enable a standard block and set visibility to French only. $block_id = strtolower($this->randomMachineName(8)); Loading
core/modules/block/tests/src/Functional/BlockUiTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -121,11 +121,11 @@ public function testBlockAdminUiPage() { $element = $this->xpath('//*[@id="blocks"]/tbody/tr[' . $values['tr'] . ']/td[1]/text()'); $this->assertEquals($element[0]->getText(), $label, 'The "' . $label . '" block title is set inside the ' . $values['settings']['region'] . ' region.'); // Look for a test block region select form element. $this->assertField('blocks[' . $values['settings']['id'] . '][region]'); $this->assertSession()->fieldExists('blocks[' . $values['settings']['id'] . '][region]'); // Move the test block to the header region. $edit['blocks[' . $values['settings']['id'] . '][region]'] = 'header'; // Look for a test block weight select form element. $this->assertField('blocks[' . $values['settings']['id'] . '][weight]'); $this->assertSession()->fieldExists('blocks[' . $values['settings']['id'] . '][weight]'); // Change the test block's weight. $edit['blocks[' . $values['settings']['id'] . '][weight]'] = $values['test_weight']; } Loading
core/modules/comment/tests/src/Functional/CommentBookTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public function testBookCommentPrint() { $this->assertText($comment_body, 'Comment body found'); $this->assertText(t('Add new comment'), 'Comment form found'); // Ensure that the comment form subject field exists. $this->assertField('subject[0][value]'); $this->assertSession()->fieldExists('subject[0][value]'); $this->drupalGet('book/export/html/' . $book_node->id()); Loading @@ -83,7 +83,7 @@ public function testBookCommentPrint() { $this->assertNoText(t('Add new comment'), 'Comment form not found'); // Verify that the comment form subject field is not found. $this->assertNoField('subject[0][value]'); $this->assertSession()->fieldNotExists('subject[0][value]'); } }
core/modules/comment/tests/src/Functional/CommentInterfaceTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -179,14 +179,14 @@ public function testCommentInterface() { $this->assertNotNull($this->node, 'Article node created.'); $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment'); $this->assertSession()->statusCodeEquals(403); $this->assertNoField('edit-comment'); $this->assertSession()->fieldNotExists('edit-comment'); // Attempt to post to node with read-only comments. $this->node = $this->drupalCreateNode(['type' => 'article', 'promote' => 1, 'comment' => [['status' => CommentItemInterface::CLOSED]]]); $this->assertNotNull($this->node, 'Article node created.'); $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment'); $this->assertSession()->statusCodeEquals(403); $this->assertNoField('edit-comment'); $this->assertSession()->fieldNotExists('edit-comment'); // Attempt to post to node with comments enabled (check field names etc). $this->node = $this->drupalCreateNode(['type' => 'article', 'promote' => 1, 'comment' => [['status' => CommentItemInterface::OPEN]]]); Loading @@ -194,7 +194,7 @@ public function testCommentInterface() { $this->drupalGet('comment/reply/node/' . $this->node->id() . '/comment'); $this->assertNoText('This discussion is closed', 'Posting to node with comments enabled'); // Ensure that the comment body field exists. $this->assertField('edit-comment-body-0-value'); $this->assertSession()->fieldExists('edit-comment-body-0-value'); // Delete comment and make sure that reply is also removed. $this->drupalLogout(); Loading