updated core to 8.6.1 via composer

This commit is contained in:
2018-09-12 13:58:26 +02:00
parent a9a219f2ed
commit ea56b9fba3
4443 changed files with 112098 additions and 40708 deletions
@@ -5,4 +5,4 @@ package: Core (Experimental)
version: VERSION
core: 8.x
dependencies:
- layout_discovery
- drupal:layout_discovery
@@ -50,8 +50,7 @@ function field_layout_entity_type_alter(array &$entity_types) {
*/
function field_layout_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
if ($display instanceof EntityDisplayWithLayoutInterface) {
\Drupal::classResolver()->getInstanceFromDefinition(FieldLayoutBuilder::class)
->buildView($build, $display);
\Drupal::classResolver(FieldLayoutBuilder::class)->buildView($build, $display);
}
}
@@ -62,8 +61,7 @@ function field_layout_form_alter(&$form, FormStateInterface $form_state, $form_i
$form_object = $form_state->getFormObject();
if ($form_object instanceof ContentEntityFormInterface && $display = $form_object->getFormDisplay($form_state)) {
if ($display instanceof EntityDisplayWithLayoutInterface) {
\Drupal::classResolver()->getInstanceFromDefinition(FieldLayoutBuilder::class)
->buildForm($form, $display);
\Drupal::classResolver(FieldLayoutBuilder::class)->buildForm($form, $display);
}
}
}
@@ -5,4 +5,4 @@ core: 8.x
package: Testing
version: VERSION
dependencies:
- entity_test
- drupal:entity_test
@@ -3,14 +3,14 @@
namespace Drupal\Tests\field_layout\FunctionalJavascript;
use Drupal\entity_test\Entity\EntityTest;
use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
/**
* Tests using field layout for entity displays.
*
* @group field_layout
*/
class FieldLayoutTest extends JavascriptTestBase {
class FieldLayoutTest extends WebDriverTestBase {
/**
* {@inheritdoc}
@@ -100,12 +100,15 @@ class FieldLayoutTest extends JavascriptTestBase {
// After a refresh the new regions are still there.
$this->drupalGet('entity_test/structure/entity_test/form-display');
$this->assertEquals(['Top', 'First', 'Second', 'Bottom', 'Disabled'], $this->getRegionTitles());
$this->assertSession()->waitForElement('css', '.tabledrag-handle');
$id = $this->getSession()->getPage()->find('css', '[name="form_build_id"]')->getValue();
// Drag the field to the second region.
$field_test_text_row = $this->getSession()->getPage()->find('css', '#field-test-text');
$second_region_row = $this->getSession()->getPage()->find('css', '.region-second-message');
$field_test_text_row->find('css', '.handle')->dragTo($second_region_row);
$this->assertSession()->assertWaitOnAjaxRequest();
$this->assertSession()->waitForElement('css', "[name='form_build_id']:not([value='$id'])");
$this->submitForm([], 'Save');
$this->assertSession()->pageTextContains('Your settings have been saved.');
@@ -158,6 +161,8 @@ class FieldLayoutTest extends JavascriptTestBase {
// After a refresh the new regions are still there.
$this->drupalGet('entity_test/structure/entity_test/display');
$this->assertEquals(['Top', 'First', 'Second', 'Bottom', 'Disabled'], $this->getRegionTitles());
$this->assertSession()->waitForElement('css', '.tabledrag-handle');
$id = $this->getSession()->getPage()->find('css', '[name="form_build_id"]')->getValue();
// Drag the field to the first region.
$this->assertTrue($this->assertSession()->optionExists('fields[field_test_text][region]', 'hidden')->isSelected());
@@ -166,6 +171,7 @@ class FieldLayoutTest extends JavascriptTestBase {
$field_test_text_row->find('css', '.handle')->dragTo($first_region_row);
$this->assertSession()->assertWaitOnAjaxRequest();
$this->assertFalse($this->assertSession()->optionExists('fields[field_test_text][region]', 'hidden')->isSelected());
$this->assertSession()->waitForElement('css', "[name='form_build_id']:not([value='$id'])");
$this->submitForm([], 'Save');
$this->assertSession()->pageTextContains('Your settings have been saved.');