Skip to content
Snippets Groups Projects
Commit df974e5b authored by Jess's avatar Jess
Browse files

Issue #2887311 by naveenvalecha, vaplas, Lendude: Convert BlockContentTypeTest...

Issue #2887311 by naveenvalecha, vaplas, Lendude: Convert BlockContentTypeTest web tests to browser tests for block_content module
parent 99ea6ac0
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
<?php
namespace Drupal\block_content\Tests;
namespace Drupal\Tests\block_content\Functional;
use Drupal\block_content\Entity\BlockContentType;
use Drupal\Component\Utility\Html;
use Drupal\Core\Url;
use Drupal\system\Tests\Menu\AssertBreadcrumbTrait;
use Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait;
/**
* Ensures that custom block type functions work correctly.
......@@ -108,7 +108,7 @@ public function testBlockContentTypeEditing() {
// Verify that title and body fields are displayed.
$this->drupalGet('block/add/basic');
$this->assertRaw('Block description', 'Block info field was found.');
$this->assertRaw('Body', 'Body field was found.');
$this->assertNotEmpty($this->cssSelect('#edit-body-0-value'), 'Body field was found.');
// Change the block type name.
$edit = [
......@@ -137,7 +137,7 @@ public function testBlockContentTypeEditing() {
$this->drupalPostForm('admin/structure/block/block-content/manage/basic', [], t('Save'));
// Check that the body field doesn't exist.
$this->drupalGet('block/add/basic');
$this->assertNoRaw('Body', 'Body field was not found.');
$this->assertEmpty($this->cssSelect('#edit-body-0-value'), 'Body field was not found.');
}
/**
......@@ -204,7 +204,7 @@ public function testsBlockContentAddTypes() {
// block configure form.
$path = $theme == $default_theme ? 'admin/structure/block' : "admin/structure/block/list/$theme";
$this->drupalGet($path);
$this->clickLinkPartialName('Place block');
$this->clickLink('Place block');
$this->clickLink(t('Add custom block'));
// The seven theme has markup inside the link, we cannot use clickLink().
if ($default_theme == 'seven') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment