You are here

function ParagraphsPackFeatureWebTestCase::check_view_mode_options in Paragraphs pack 7

Parameters

string $entity_type: The specified entity type.

3 calls to ParagraphsPackFeatureWebTestCase::check_view_mode_options()
ParagraphsPackNodeListTestViewModeCase::testParagraphsPackNodeListViewModeOptions in modules/paragraphs_pack_node_list/tests/paragraphs_pack_node_list.test
Test view mode options.
ParagraphsPackTaxonomyTermListTestViewModeCase::testParagraphsPackTaxonomyTermListViewModeOptions in modules/paragraphs_pack_taxonomy_term_list/tests/paragraphs_pack_taxonomy_term_list.test
Test view mode options.
ParagraphsPackUserListTestViewModeCase::testParagraphsPackUserListViewModeOptions in modules/paragraphs_pack_user_list/tests/paragraphs_pack_user_list.test
Test view mode options.

File

tests/paragraphs_pack.test_helper.inc, line 64
Paragraphs pack content module's tests.

Class

ParagraphsPackFeatureWebTestCase
Class ParagraphsPackWebTestCase

Code

function check_view_mode_options($entity_type = 'node') {

  // Prepare page for testing.
  $this
    ->load_create_new_content_page();
  $this
    ->click_add_paragraph_button();

  // Get view mode options.
  $select_element = $this
    ->check_paragraphs_select_element_existence();
  if ($select_element == FALSE) {

    // There's nothing more to test if the element doesn't exist.
    return;
  }
  $options = $this
    ->get_options_machine_names($select_element);

  // Do the testing.
  $this
    ->validate_view_mode_options($entity_type, $options);
}