trait TranslationTestTrait in Layout Builder Symmetric Translations 8
Common functions for testing Layout Builder with translations.
Hierarchy
- trait \Drupal\Tests\layout_builder_st\Functional\TranslationTestTrait
3 files declare their use of TranslationTestTrait
- InlineBlockTranslationTest.php in tests/
src/ FunctionalJavascript/ InlineBlockTranslationTest.php - ModeratedTranslationTest.php in tests/
src/ FunctionalJavascript/ ModeratedTranslationTest.php - TranslationTest.php in tests/
src/ FunctionalJavascript/ TranslationTest.php
File
- tests/
src/ Functional/ TranslationTestTrait.php, line 8
Namespace
Drupal\Tests\layout_builder_st\FunctionalView source
trait TranslationTestTrait {
/**
* Asserts that non-trans actions have been removed.
*/
protected function assertNonTranslationActionsRemoved() {
/** @var \Drupal\Tests\WebAssert $assert_session */
$assert_session = $this
->assertSession();
// Confirm that links do not exist to change the layout.
$assert_session
->linkNotExists('Add Section');
$assert_session
->linkNotExists('Add Block');
$assert_session
->linkNotExists('Remove section');
$assert_session
->elementNotExists('css', '[data-contextual-id^="layout_builder_block:"]');
$assert_session
->buttonNotExists('Revert to defaults');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TranslationTestTrait:: |
protected | function | Asserts that non-trans actions have been removed. |