You are here

protected function InsertFileTestBase::updateInsertSettings in Insert 8.2

Parameters

string $field_name:

array $settings:

30 calls to InsertFileTestBase::updateInsertSettings()
InsertColorboxTest::testGallery in modules/insert_colorbox/tests/src/FunctionalJavaScript/InsertColorboxTest.php
InsertColorboxTest::testLinkWidgetSetting in modules/insert_colorbox/tests/src/FunctionalJavaScript/InsertColorboxTest.php
InsertColorboxTest::testWithoutGallery in modules/insert_colorbox/tests/src/FunctionalJavaScript/InsertColorboxTest.php
InsertFileTest::testAbsoluteUrlSetting in tests/src/FunctionalJavaScript/InsertFileTest.php
InsertFileTest::testAdditionalCssClassesSetting in tests/src/FunctionalJavaScript/InsertFileTest.php

... See full list

File

tests/src/FunctionalJavaScript/InsertFileTestBase.php, line 89

Class

InsertFileTestBase

Namespace

Drupal\Tests\insert\FunctionalJavascript

Code

protected function updateInsertSettings($field_name, array $settings) {
  $manage_display = 'admin/structure/types/manage/' . $this->contentTypeName . '/form-display';
  $this
    ->drupalGet($manage_display);
  $this
    ->submitForm([], $field_name . "_settings_edit");
  $this
    ->getSession()
    ->getPage()
    ->find('css', 'summary')
    ->click();
  $this
    ->assertSession()
    ->waitForField('fields[' . $field_name . '][settings_edit_form][third_party_settings][insert][default]');
  $this
    ->submitForm($this
    ->settingsToParams($field_name, $settings), $this
    ->t('Update'));
  $this
    ->submitForm([], 'Save');
}