You are here

public function FeedsParaMapperMultiValuedMappingTestCase::testSettingsAvailable in Feeds Paragraphs 7

Test the user can see paragraphs fields in fields mapping.

1- Checks if the paragraphs bundles fields are visible. 2- Checks if a multi valued field has the settings.

File

tests/mapping.test, line 104
Contains MappingTestCase.

Class

FeedsParaMapperMultiValuedMappingTestCase
Tests mapping to a multi-valued Paragraphs field.

Code

public function testSettingsAvailable() {
  $target = 'field_' . $this->bundles[0]['fields'][0]['name'];
  $this
    ->drupalGet('admin/structure/feeds/' . $this->importer . '/mapping');
  $targets = array(
    'text' => $target,
  );
  $this
    ->map($targets);

  // Click the gear button so it shows the configuration form:
  $button_name = "mapping_settings_edit_0";
  $this
    ->drupalPostAJAX(NULL, array(), $button_name);
  $message = "Maximum Values field exists";
  $this
    ->assertField('config[0][settings][max_values]', $message);
}