You are here

public function LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel in Lingotek Translation 3.2.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel()
  2. 4.0.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel()
  3. 3.0.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel()
  4. 3.1.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel()
  5. 3.3.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel()
  6. 3.4.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel()
  7. 3.5.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel()
  8. 3.6.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel()
  9. 3.7.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel()
  10. 3.8.x tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeNestedParagraphsTranslationTest::testBulkManagementParagraphsDontAllowFilteringByLabel()

Paragraphs don't have a title, so we should disallow filtering by it.

File

tests/src/Functional/LingotekNodeNestedParagraphsTranslationTest.php, line 198

Class

LingotekNodeNestedParagraphsTranslationTest
Tests translating a node with multiple locales including nested paragraphs.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testBulkManagementParagraphsDontAllowFilteringByLabel() {

  // Login as admin.
  $this
    ->drupalLogin($this->rootUser);

  // Add paragraphed content.
  $this
    ->drupalGet('node/add/paragraphed_nested_content');
  $this
    ->drupalPostForm(NULL, NULL, t('Add Image + Text'));
  $this
    ->drupalPostForm(NULL, NULL, t('Add Image + Text'));
  $edit = [];
  $edit['title[0][value]'] = 'Llamas are cool';
  $edit['langcode[0][value]'] = 'en';
  $edit['field_paragraph_container[0][subform][field_paragraphs_demo][0][subform][field_text_demo][0][value]'] = 'Llamas are very cool for the first time';
  $edit['field_paragraph_container[0][subform][field_paragraphs_demo][1][subform][field_text_demo][0][value]'] = 'Llamas are very cool for the second time';
  $this
    ->saveAndPublishNodeForm($edit, NULL);
  $this
    ->goToContentBulkManagementForm('paragraph');
  $this
    ->assertNoField('filters[wrapper][label]', 'There is no filter by label as paragraphs have no label.');
}