You are here

public function LayoutBuilderAtInstallTest::testInstall in Layout Builder Asymmetric Translation 8.2

Tests that existing fields become translatable on install of the module.

Throws

\Behat\Mink\Exception\ExpectationException

\Behat\Mink\Exception\ResponseTextException

File

tests/src/Functional/LayoutBuilderAtInstallTest.php, line 43

Class

LayoutBuilderAtInstallTest
Layout Builder Asymmetric Translations install tests.

Namespace

Drupal\Tests\layout_builder_at\Functional

Code

public function testInstall() {
  $assert_session = $this
    ->assertSession();
  $this
    ->drupalGet('entity_test_mul/structure/entity_test_mul/display/default/layout');

  // Make layout builder field translatable.
  $this
    ->drupalGet('admin/config/regional/content-language');
  $edit = [
    'settings[entity_test_mul][entity_test_mul][fields][layout_builder__layout]' => TRUE,
  ];
  $assert_session
    ->pageTextNotContains('Layout Builder does not support translating layouts.');
  $this
    ->drupalPostForm(NULL, $edit, 'Save configuration');
}