Issue #3042089 by bnjmnm: Update Layout Builder functional javascript tests now that local tasks are not required by the UI

merge-requests/1119/head
xjm 2019-03-26 17:30:19 -05:00
parent b0a741c568
commit e9c89de011
14 changed files with 6 additions and 59 deletions

View File

@ -31,10 +31,6 @@ class LayoutBuilderMultilingualTest extends BrowserTestBase {
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
// There must be more than one block type available to trigger
// \Drupal\layout_builder\Controller\ChooseBlockController::inlineBlockList().
BlockContentType::create([
@ -81,8 +77,8 @@ class LayoutBuilderMultilingualTest extends BrowserTestBase {
*/
public function testCustomBlocks() {
// Check translated and untranslated entities before translating the string.
$this->assertCustomBlocks('node/1');
$this->assertCustomBlocks('es/node/1');
$this->assertCustomBlocks('node/1/layout');
$this->assertCustomBlocks('es/node/1/layout');
// Translate the 'Inline blocks' string used as a category in
// \Drupal\layout_builder\Controller\ChooseBlockController::inlineBlockList().
@ -90,8 +86,8 @@ class LayoutBuilderMultilingualTest extends BrowserTestBase {
$this->drupalPostForm(NULL, ['Translated string (Spanish)' => 'Bloques en linea'], 'Save translations');
// Check translated and untranslated entities after translating the string.
$this->assertCustomBlocks('node/1');
$this->assertCustomBlocks('es/node/1');
$this->assertCustomBlocks('node/1/layout');
$this->assertCustomBlocks('es/node/1/layout');
}
/**
@ -105,7 +101,6 @@ class LayoutBuilderMultilingualTest extends BrowserTestBase {
$assert_session = $this->assertSession();
$this->drupalGet($url);
$page->clickLink('Layout');
$page->clickLink('Add Block');
$page->clickLink('Create custom block');
$assert_session->linkExists('First type');

View File

@ -26,10 +26,6 @@ class LayoutBuilderSectionStorageTest extends BrowserTestBase {
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
$this->createContentType(['type' => 'bundle_with_section_field']);
$this->createNode([
'type' => 'bundle_with_section_field',

View File

@ -35,8 +35,6 @@ class LayoutBuilderTest extends BrowserTestBase {
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
// Create two nodes.

View File

@ -22,10 +22,6 @@ class LayoutDisplayTest extends BrowserTestBase {
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
$this->createContentType([
'type' => 'bundle_with_section_field',
]);
@ -56,8 +52,7 @@ class LayoutDisplayTest extends BrowserTestBase {
$this->drupalGet('node/1');
$assert_session->pageTextNotContains('Powered by Drupal');
$assert_session->linkExists('Layout');
$this->clickLink('Layout');
$this->drupalGet('node/1/layout');
$assert_session->linkExists('Add Block');
$this->clickLink('Add Block');
$assert_session->linkExists('Powered by Drupal');

View File

@ -47,10 +47,6 @@ abstract class LayoutRestTestBase extends ResourceTestBase {
parent::setUp();
$assert_session = $this->assertSession();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
$this->createContentType(['type' => 'bundle_with_section_field']);
$this->drupalLogin($this->drupalCreateUser([
@ -78,7 +74,6 @@ abstract class LayoutRestTestBase extends ResourceTestBase {
]);
$this->drupalGet('node/' . $this->node->id() . '/layout');
$page->clickLink('Layout');
$page->clickLink('Add Block');
$page->clickLink('Powered by Drupal');
$page->fillField('settings[label]', 'This is an override');

View File

@ -31,9 +31,6 @@ class BlockFormMessagesTest extends WebDriverTestBase {
*/
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
$this->createContentType(['type' => 'bundle_with_section_field']);
}

View File

@ -31,10 +31,6 @@ class ContentPreviewToggleTest extends WebDriverTestBase {
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
$this->createContentType(['type' => 'bundle_for_this_particular_test']);
$this->drupalLogin($this->drupalCreateUser([

View File

@ -46,8 +46,7 @@ abstract class InlineBlockTestBase extends WebDriverTestBase {
*/
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
$this->createContentType(['type' => 'bundle_with_section_field', 'new_revision' => TRUE]);

View File

@ -40,10 +40,6 @@ class LayoutBuilderDisableInteractionsTest extends WebDriverTestBase {
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
$this->createContentType(['type' => 'bundle_with_section_field']);
$this->createNode([
'type' => 'bundle_with_section_field',

View File

@ -26,10 +26,6 @@ class LayoutBuilderOptInTest extends WebDriverTestBase {
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
// Create one content type before installing Layout Builder and one after.
$this->createContentType(['type' => 'before']);
$this->container->get('module_installer')->install(['layout_builder']);

View File

@ -63,10 +63,6 @@ class LayoutBuilderQuickEditTest extends QuickEditJavascriptTestBase {
$this->drupalPlaceBlock('page_title_block');
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
// Create the Article node type.
$this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']);
$this->article = $this->drupalCreateNode([

View File

@ -38,10 +38,6 @@ class LayoutBuilderUiTest extends WebDriverTestBase {
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
$this->createContentType(['type' => 'bundle_with_section_field']);
$this->drupalLogin($this->drupalCreateUser([

View File

@ -39,10 +39,6 @@ class MoveBlockFormTest extends WebDriverTestBase {
$page = $this->getSession()->getPage();
$assert_session = $this->assertSession();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
$this->createContentType(['type' => 'bundle_with_section_field']);
$this->drupalLogin($this->drupalCreateUser([

View File

@ -31,10 +31,6 @@ class TestMultiWidthLayoutsTest extends WebDriverTestBase {
protected function setUp() {
parent::setUp();
// @todo The Layout Builder UI relies on local tasks; fix in
// https://www.drupal.org/project/drupal/issues/2917777.
$this->drupalPlaceBlock('local_tasks_block');
$this->createContentType(['type' => 'bundle_with_section_field']);
$this->drupalLogin($this->drupalCreateUser([