From f32af25f150f93f1ebb8470d5f640742b21e0da3 Mon Sep 17 00:00:00 2001
From: Brian Canini <canini.16@osu.edu>
Date: Tue, 22 Dec 2020 14:10:29 -0500
Subject: [PATCH] Updating drupal/inline_entity_form (1.0.0-rc7 => 1.0.0-rc8)

---
 composer.json                                 |  2 +-
 composer.lock                                 | 16 +++++------
 vendor/composer/installed.json                | 16 +++++------
 .../inline_entity_form.api.php                | 14 +++++-----
 .../inline_entity_form.info.yml               |  8 +++---
 .../inline_entity_form.module                 |  3 +-
 .../FieldWidget/InlineEntityFormComplex.php   |  6 ----
 .../src/TranslationHelper.php                 |  2 +-
 .../install/node.type.ief_simple_single.yml   |  2 +-
 .../inline_entity_form_test.info.yml          |  7 ++---
 ...line_entity_form_translation_test.info.yml |  7 ++---
 .../ComplexSimpleWidgetTest.php               |  4 +--
 .../ComplexWidgetRevisionsTest.php            |  4 +--
 .../ComplexWidgetTest.php                     | 28 +++++++++++++++++--
 .../FunctionalJavascript/ElementWebTest.php   |  4 +--
 .../InlineEntityFormTestBase.php              | 17 ++++++++++-
 .../FunctionalJavascript/SimpleWidgetTest.php | 20 ++++++-------
 .../FunctionalJavascript/TranslationTest.php  |  4 +--
 18 files changed, 98 insertions(+), 66 deletions(-)

diff --git a/composer.json b/composer.json
index 04965fbaf9..354ac9a6ac 100644
--- a/composer.json
+++ b/composer.json
@@ -130,7 +130,7 @@
         "drupal/google_tag": "1.4",
         "drupal/honeypot": "1.30",
         "drupal/image_popup": "1.1",
-        "drupal/inline_entity_form": "1.0-rc7",
+        "drupal/inline_entity_form": "1.0-rc8",
         "drupal/libraries": "3.0.0-alpha6",
         "drupal/link_attributes": "1.11",
         "drupal/linkit": "5.0-beta11",
diff --git a/composer.lock b/composer.lock
index 791123dec4..6e0957af2f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "9909b71b39861fcde2b53c5d327ee3ed",
+    "content-hash": "5b791c842c884b094fc6ecbaa68ff7d9",
     "packages": [
         {
             "name": "alchemy/zippy",
@@ -5352,17 +5352,17 @@
         },
         {
             "name": "drupal/inline_entity_form",
-            "version": "1.0.0-rc7",
+            "version": "1.0.0-rc8",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/inline_entity_form.git",
-                "reference": "8.x-1.0-rc7"
+                "reference": "8.x-1.0-rc8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/inline_entity_form-8.x-1.0-rc7.zip",
-                "reference": "8.x-1.0-rc7",
-                "shasum": "a11e59a8f3632728165170e9337cec9bc8eab870"
+                "url": "https://ftp.drupal.org/files/projects/inline_entity_form-8.x-1.0-rc8.zip",
+                "reference": "8.x-1.0-rc8",
+                "shasum": "103de382dd07b4acdd6bacd5ad76628fdf0eefda"
             },
             "require": {
                 "drupal/core": "^8.7.7 || ^9"
@@ -5373,8 +5373,8 @@
             "type": "drupal-module",
             "extra": {
                 "drupal": {
-                    "version": "8.x-1.0-rc7",
-                    "datestamp": "1595545223",
+                    "version": "8.x-1.0-rc8",
+                    "datestamp": "1602172716",
                     "security-coverage": {
                         "status": "not-covered",
                         "message": "RC releases are not covered by Drupal security advisories."
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 35095aa591..d92ac9d51a 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -5512,18 +5512,18 @@
     },
     {
         "name": "drupal/inline_entity_form",
-        "version": "1.0.0-rc7",
-        "version_normalized": "1.0.0.0-RC7",
+        "version": "1.0.0-rc8",
+        "version_normalized": "1.0.0.0-RC8",
         "source": {
             "type": "git",
             "url": "https://git.drupalcode.org/project/inline_entity_form.git",
-            "reference": "8.x-1.0-rc7"
+            "reference": "8.x-1.0-rc8"
         },
         "dist": {
             "type": "zip",
-            "url": "https://ftp.drupal.org/files/projects/inline_entity_form-8.x-1.0-rc7.zip",
-            "reference": "8.x-1.0-rc7",
-            "shasum": "a11e59a8f3632728165170e9337cec9bc8eab870"
+            "url": "https://ftp.drupal.org/files/projects/inline_entity_form-8.x-1.0-rc8.zip",
+            "reference": "8.x-1.0-rc8",
+            "shasum": "103de382dd07b4acdd6bacd5ad76628fdf0eefda"
         },
         "require": {
             "drupal/core": "^8.7.7 || ^9"
@@ -5534,8 +5534,8 @@
         "type": "drupal-module",
         "extra": {
             "drupal": {
-                "version": "8.x-1.0-rc7",
-                "datestamp": "1595545223",
+                "version": "8.x-1.0-rc8",
+                "datestamp": "1602172716",
                 "security-coverage": {
                     "status": "not-covered",
                     "message": "RC releases are not covered by Drupal security advisories."
diff --git a/web/modules/inline_entity_form/inline_entity_form.api.php b/web/modules/inline_entity_form/inline_entity_form.api.php
index 444f5cfcd5..4e310ec33e 100644
--- a/web/modules/inline_entity_form/inline_entity_form.api.php
+++ b/web/modules/inline_entity_form/inline_entity_form.api.php
@@ -8,12 +8,12 @@
 /**
  * Perform alterations before an entity form is included in the IEF widget.
  *
- * @param $entity_form
+ * @param array $entity_form
  *   Nested array of form elements that comprise the entity form.
- * @param $form_state
+ * @param \Drupal\Core\Form\FormStateInterface $form_state
  *   The form state of the parent form.
  */
-function hook_inline_entity_form_entity_form_alter(&$entity_form, &$form_state) {
+function hook_inline_entity_form_entity_form_alter(array &$entity_form, FormStateInterface &$form_state) {
   if ($entity_form['#entity_type'] == 'commerce_line_item') {
     $entity_form['quantity']['#description'] = t('New quantity description.');
   }
@@ -25,12 +25,12 @@ function hook_inline_entity_form_entity_form_alter(&$entity_form, &$form_state)
  * The reference form is used to add existing entities through an autocomplete
  * field
  *
- * @param $reference_form
+ * @param array $reference_form
  *   Nested array of form elements that comprise the reference form.
- * @param $form_state
+ * @param \Drupal\Core\Form\FormStateInterface $form_state
  *   The form state of the parent form.
  */
-function hook_inline_entity_form_reference_form_alter(&$reference_form, &$form_state) {
+function hook_inline_entity_form_reference_form_alter(array &$reference_form, FormStateInterface &$form_state) {
   $reference_form['entity_id']['#description'] = t('New autocomplete description');
 }
 
@@ -49,7 +49,7 @@ function hook_inline_entity_form_reference_form_alter(&$reference_form, &$form_s
  *
  * @see \Drupal\inline_entity_form\InlineFormInterface::getTableFields()
  */
-function hook_inline_entity_form_table_fields_alter(&$fields, $context) {
+function hook_inline_entity_form_table_fields_alter(array &$fields, array $context) {
   if ($context['entity_type'] == 'commerce_product_variation') {
     $fields['field_category'] = [
       'type' => 'field',
diff --git a/web/modules/inline_entity_form/inline_entity_form.info.yml b/web/modules/inline_entity_form/inline_entity_form.info.yml
index 666ff00c9c..1473ecf9f1 100644
--- a/web/modules/inline_entity_form/inline_entity_form.info.yml
+++ b/web/modules/inline_entity_form/inline_entity_form.info.yml
@@ -2,9 +2,9 @@ name: Inline Entity Form
 description: "Provides a widget for inline management (creation, modification, removal) of referenced entities. "
 type: module
 package: Fields
-core_version_requirement: ^8.7.7 || ^9
+core_version_requirement: ^8.8 || ^9
 
-# Information added by Drupal.org packaging script on 2020-07-23
-version: '8.x-1.0-rc7'
+# Information added by Drupal.org packaging script on 2020-10-08
+version: '8.x-1.0-rc8'
 project: 'inline_entity_form'
-datestamp: 1595545225
+datestamp: 1602172718
diff --git a/web/modules/inline_entity_form/inline_entity_form.module b/web/modules/inline_entity_form/inline_entity_form.module
index d535200ce7..a70374fff2 100644
--- a/web/modules/inline_entity_form/inline_entity_form.module
+++ b/web/modules/inline_entity_form/inline_entity_form.module
@@ -66,7 +66,7 @@ function inline_entity_form_theme() {
  * @return array
  *   The form array containing the embedded form.
  */
-function inline_entity_form_reference_form($reference_form, &$form_state) {
+function inline_entity_form_reference_form($reference_form, FormStateInterface &$form_state) {
   $labels = $reference_form['#ief_labels'];
   $ief_id = $reference_form['#ief_id'];
   /** @var \Drupal\field\Entity\FieldConfig $instance */
@@ -413,6 +413,7 @@ function template_preprocess_inline_entity_form_entity_table(array &$variables)
     $rows[] = $cells + ['#attributes' => ['class' => $row_classes]];
     // If the current entity array specifies a form, output it in the next row.
     if (!empty($form[$key]['form'])) {
+      $row = [];
       $row[] = $form[$key]['form'] + ['#wrapper_attributes' => ['colspan' => count($fields) + 1]];
       $rows[] = $row + ['#attributes' => ['class' => ['ief-row-form'], 'no_striping' => TRUE]];
     }
diff --git a/web/modules/inline_entity_form/src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php b/web/modules/inline_entity_form/src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php
index 39f1da5835..2edad9ad69 100644
--- a/web/modules/inline_entity_form/src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php
+++ b/web/modules/inline_entity_form/src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php
@@ -575,12 +575,6 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
         }
         $process_element['#process'][] = [get_class($this), 'hideCancel'];
       }
-
-      // No entities have been added. Remove the outer fieldset to reduce
-      // visual noise caused by having two titles.
-      if (empty($entities)) {
-        $element['#type'] = 'container';
-      }
     }
 
     return $element;
diff --git a/web/modules/inline_entity_form/src/TranslationHelper.php b/web/modules/inline_entity_form/src/TranslationHelper.php
index 6ff8670eb0..fd5d88c508 100644
--- a/web/modules/inline_entity_form/src/TranslationHelper.php
+++ b/web/modules/inline_entity_form/src/TranslationHelper.php
@@ -69,7 +69,7 @@ public static function prepareEntity(ContentEntityInterface $entity, FormStateIn
    * @return bool
    *   TRUE if the entity langcode was updated, FALSE otherwise.
    */
-  public static function updateEntityLangcode(ContentEntityInterface $entity, $form_state) {
+  public static function updateEntityLangcode(ContentEntityInterface $entity, FormStateInterface $form_state) {
     $changed = FALSE;
     // This method is first called during form validation, at which point
     // the 'langcode' form state flag hasn't been updated with the new value.
diff --git a/web/modules/inline_entity_form/tests/modules/inline_entity_form_test/config/install/node.type.ief_simple_single.yml b/web/modules/inline_entity_form/tests/modules/inline_entity_form_test/config/install/node.type.ief_simple_single.yml
index eff6a9d753..f115d2899b 100644
--- a/web/modules/inline_entity_form/tests/modules/inline_entity_form_test/config/install/node.type.ief_simple_single.yml
+++ b/web/modules/inline_entity_form/tests/modules/inline_entity_form_test/config/install/node.type.ief_simple_single.yml
@@ -1,5 +1,5 @@
 type: ief_simple_single
-name: IEF single simple
+name: IEF simple single
 description: 'Content type for testing simple IEF widget on a single-value field.'
 help: ''
 new_revision: false
diff --git a/web/modules/inline_entity_form/tests/modules/inline_entity_form_test/inline_entity_form_test.info.yml b/web/modules/inline_entity_form/tests/modules/inline_entity_form_test/inline_entity_form_test.info.yml
index fdf1e3544a..cd42b6ab2f 100644
--- a/web/modules/inline_entity_form/tests/modules/inline_entity_form_test/inline_entity_form_test.info.yml
+++ b/web/modules/inline_entity_form/tests/modules/inline_entity_form_test/inline_entity_form_test.info.yml
@@ -1,7 +1,6 @@
 name: 'IEF test'
 type: module
 description: 'Support module for the Inline entity form module tests.'
-core_version_requirement: ^8.7.7 || ^9
 package: Testing
 dependencies:
   - inline_entity_form:inline_entity_form
@@ -9,7 +8,7 @@ dependencies:
   - drupal:file
   - drupal:image
 
-# Information added by Drupal.org packaging script on 2020-07-23
-version: '8.x-1.0-rc7'
+# Information added by Drupal.org packaging script on 2020-10-08
+version: '8.x-1.0-rc8'
 project: 'inline_entity_form'
-datestamp: 1595545225
+datestamp: 1602172718
diff --git a/web/modules/inline_entity_form/tests/modules/inline_entity_form_translation_test/inline_entity_form_translation_test.info.yml b/web/modules/inline_entity_form/tests/modules/inline_entity_form_translation_test/inline_entity_form_translation_test.info.yml
index 372f1dd280..d206eee026 100644
--- a/web/modules/inline_entity_form/tests/modules/inline_entity_form_translation_test/inline_entity_form_translation_test.info.yml
+++ b/web/modules/inline_entity_form/tests/modules/inline_entity_form_translation_test/inline_entity_form_translation_test.info.yml
@@ -1,14 +1,13 @@
 name: 'IEF translation test'
 type: module
 description: 'Support module for the Inline entity form module tests.'
-core_version_requirement: ^8.7.7 || ^9
 package: Testing
 dependencies:
   - inline_entity_form_test:inline_entity_form_test
   - drupal:language
   - drupal:content_translation
 
-# Information added by Drupal.org packaging script on 2020-07-23
-version: '8.x-1.0-rc7'
+# Information added by Drupal.org packaging script on 2020-10-08
+version: '8.x-1.0-rc8'
 project: 'inline_entity_form'
-datestamp: 1595545225
+datestamp: 1602172718
diff --git a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexSimpleWidgetTest.php b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexSimpleWidgetTest.php
index 2a53a7dea2..962ed2989f 100644
--- a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexSimpleWidgetTest.php
+++ b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexSimpleWidgetTest.php
@@ -16,7 +16,7 @@ class ComplexSimpleWidgetTest extends InlineEntityFormTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'inline_entity_form_test',
     'field',
     'field_ui',
@@ -25,7 +25,7 @@ class ComplexSimpleWidgetTest extends InlineEntityFormTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->user = $this->createUser([
diff --git a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexWidgetRevisionsTest.php b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexWidgetRevisionsTest.php
index 9796ba450f..ad536497c9 100644
--- a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexWidgetRevisionsTest.php
+++ b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexWidgetRevisionsTest.php
@@ -14,7 +14,7 @@ class ComplexWidgetRevisionsTest extends InlineEntityFormTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'field_ui',
     'entity_test',
@@ -32,7 +32,7 @@ class ComplexWidgetRevisionsTest extends InlineEntityFormTestBase {
   /**
    * Prepares environment for testing.
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->user = $this->createUser([
diff --git a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexWidgetTest.php b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexWidgetTest.php
index 71dbf36606..a4e2108edb 100644
--- a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexWidgetTest.php
+++ b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ComplexWidgetTest.php
@@ -22,7 +22,7 @@ class ComplexWidgetTest extends InlineEntityFormTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'inline_entity_form_test',
     'field',
     'field_ui',
@@ -45,7 +45,7 @@ class ComplexWidgetTest extends InlineEntityFormTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->user = $this->createUser([
@@ -79,11 +79,19 @@ public function testEmptyField() {
     $first_name_field_xpath = $this->getXpathForNthInputByLabelText('First name', 1);
     $last_name_field_xpath = $this->getXpathForNthInputByLabelText('Last name', 1);
 
+    // Get the xpath selectors for the fieldset labels in this test.
+    $fieldset_label_all_bundles_xpath = $this->getXpathForFieldsetLabel('All bundles', 1);
+    $fieldset_label_multi_xpath = $this->getXpathForFieldsetLabel('Multiple nodes', 1);
+
     $assert_session = $this->assertSession();
     // Don't allow addition of existing nodes.
     $this->updateSetting('allow_existing', FALSE);
     $this->drupalGet($this->formContentAddUrl);
 
+    // Assert fieldset title on inline form exists.
+    $assert_session->elementExists('xpath', $fieldset_label_all_bundles_xpath);
+    $assert_session->elementExists('xpath', $fieldset_label_multi_xpath);
+
     // Assert title field on inline form exists.
     $assert_session->elementExists('xpath', $inner_title_field_xpath);
     // Assert first name field on inline form exists.
@@ -99,6 +107,8 @@ public function testEmptyField() {
     $this->drupalGet($this->formContentAddUrl);
     $multi_fieldset = $assert_session
       ->elementExists('css', 'fieldset[data-drupal-selector="edit-multi"]');
+    // Assert fieldset titles.
+    $assert_session->elementExists('xpath', $fieldset_label_multi_xpath);
     // Assert title field does not appear.
     $assert_session->elementNotExists('xpath', $inner_title_field_xpath);
     // Assert first name field does not appear.
@@ -108,6 +118,8 @@ public function testEmptyField() {
     $assert_session->buttonExists('Add existing node', $multi_fieldset);
     // Now submit 'Add new node' button in the 'Multiple nodes' fieldset.
     $multi_fieldset->pressButton('Add new node');
+    // Assert fieldset title.
+    $assert_session->elementExists('xpath', $fieldset_label_multi_xpath);
     // Assert title field on inline form exists.
     $this->assertNotEmpty($assert_session->waitForElement('xpath', $inner_title_field_xpath));
     // Assert first name field on inline form exists.
@@ -220,11 +232,17 @@ public function testNestedEntityCreationWithDifferentBundlesAjaxSubmit() {
     $nested_title_field_xpath = $this->getXpathForNthInputByLabelText('Title', 2);
     $double_nested_title_field_xpath = $this->getXpathForNthInputByLabelText('Title', 3);
 
+    // Get the xpath selectors for the fieldset labels in this test.
+    $top_fieldset_label_xpath = $this->getXpathForFieldsetLabel('Multiple nodes', 1);
+    $nested_fieldset_label_xpath = $this->getXpathForFieldsetLabel('Multiple nodes', 2);
+
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
 
     foreach ([FALSE, TRUE] as $required) {
       $this->setupNestedComplexForm($required);
+      $assert_session->elementExists('xpath', $top_fieldset_label_xpath);
+      $assert_session->elementExists('xpath', $nested_fieldset_label_xpath);
       $required_string = ($required) ? ' required' : ' unrequired';
       $double_nested_title = 'Dream within a dream' . $required_string;
       $nested_title = 'Dream' . $required_string;
@@ -266,10 +284,16 @@ public function testNestedEntityCreationWithDifferentBundlesNoAjaxSubmit() {
     $nested_title_field_xpath = $this->getXpathForNthInputByLabelText('Title', 2);
     $double_nested_title_field_xpath = $this->getXpathForNthInputByLabelText('Title', 3);
 
+    // Get the xpath selectors for the fieldset labels in this test.
+    $top_fieldset_label_xpath = $this->getXpathForFieldsetLabel('Multiple nodes', 1);
+    $nested_fieldset_label_xpath = $this->getXpathForFieldsetLabel('Multiple nodes', 2);
+
     $page = $this->getSession()->getPage();
     $assert_session = $this->assertSession();
     foreach ([FALSE, TRUE] as $required) {
       $this->setupNestedComplexForm($required);
+      $assert_session->elementExists('xpath', $top_fieldset_label_xpath);
+      $assert_session->elementExists('xpath', $nested_fieldset_label_xpath);
       $required_string = ($required) ? ' required' : ' unrequired';
       $double_nested_title = 'Dream within a dream' . $required_string;
       $nested_title = 'Dream' . $required_string;
diff --git a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ElementWebTest.php b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ElementWebTest.php
index 46c5d4ed76..d1778462c9 100644
--- a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ElementWebTest.php
+++ b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/ElementWebTest.php
@@ -14,12 +14,12 @@ class ElementWebTest extends InlineEntityFormTestBase {
    *
    * @var array
    */
-  public static $modules = ['inline_entity_form_test'];
+  protected static $modules = ['inline_entity_form_test'];
 
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->user = $this->createUser([
diff --git a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/InlineEntityFormTestBase.php b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/InlineEntityFormTestBase.php
index 5f0625218c..3e000388c2 100644
--- a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/InlineEntityFormTestBase.php
+++ b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/InlineEntityFormTestBase.php
@@ -38,7 +38,7 @@ abstract class InlineEntityFormTestBase extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->fieldStorageConfigStorage = $this->container->get('entity_type.manager')->getStorage('field_storage_config');
     $this->fieldConfigStorage = $this->container->get('entity_type.manager')->getStorage('field_config');
@@ -286,6 +286,21 @@ protected function getXpathForButtonWithValue($value, $index) {
     return "(//input[@type='submit' and @value='{$value}'][{$index}])";
   }
 
+  /**
+   * Returns xpath selector for fieldset label.
+   *
+   * @param string $label
+   *   The label text to select.
+   * @param int $index
+   *   The index of the fieldset label to select.
+   *
+   * @return string
+   *   The xpath selector for the fieldset label to select.
+   */
+  protected function getXpathForFieldsetLabel($label, $index) {
+    return "(//fieldset/legend/span[.='{$label}'])[{$index}]";
+  }
+
   /**
    * Looks for the specified selector and returns TRUE when it is unavailable.
    *
diff --git a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/SimpleWidgetTest.php b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/SimpleWidgetTest.php
index 95df5451e1..a634314a80 100644
--- a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/SimpleWidgetTest.php
+++ b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/SimpleWidgetTest.php
@@ -18,12 +18,12 @@ class SimpleWidgetTest extends InlineEntityFormTestBase {
    *
    * @var array
    */
-  public static $modules = ['inline_entity_form_test'];
+  protected static $modules = ['inline_entity_form_test'];
 
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->user = $this->createUser([
@@ -78,7 +78,7 @@ public function testSimpleCardinalityOptions() {
         $assert_session->elementExists('xpath', $first_nested_title_field_xpath)->setValue('Nested single node');
         $assert_session->elementExists('xpath', $first_positive_int_field_xpath)->setValue(42);
         $page->pressButton('Save');
-        $assert_session->pageTextContains('IEF single simple Host node has been created.');
+        $assert_session->pageTextContains('IEF simple single Host node has been created.');
         $host_node = $this->getNodeByTitle('Host node');
       }
       elseif ($cardinality === 2) {
@@ -90,7 +90,7 @@ public function testSimpleCardinalityOptions() {
         $assert_session->elementExists('xpath', $second_nested_title_field_xpath)->setValue('Nested single node 3');
         $assert_session->elementExists('xpath', $second_positive_int_field_xpath)->setValue(42);
         $page->pressButton('Save');
-        $assert_session->pageTextContains('IEF single simple Host node 2 has been created.');
+        $assert_session->pageTextContains('IEF simple single Host node 2 has been created.');
         $host_node = $this->getNodeByTitle('Host node 2');
       }
       elseif ($cardinality === FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED) {
@@ -117,7 +117,7 @@ public function testSimpleCardinalityOptions() {
         $assert_session->elementExists('xpath', $third_nested_title_field_xpath)->setValue('Nested single node 6');
         $assert_session->elementExists('xpath', $third_positive_int_field_xpath)->setValue(42);
         $page->pressButton('Save');
-        $assert_session->pageTextContains('IEF single simple Host node 3 has been created.');
+        $assert_session->pageTextContains('IEF simple single Host node 3 has been created.');
         $host_node = $this->getNodeByTitle('Host node 3');
       }
       $this->checkEditAccess($host_node, $number_of_items, $cardinality);
@@ -150,7 +150,7 @@ public function testSimpleValidation() {
     $page->pressButton('Save');
 
     // Assert title validation fires on Inline Entity Form widget.
-    $assert_session->pageTextNotContains('IEF single simple Host Validation Node has been created.');
+    $assert_session->pageTextNotContains('IEF simple single Host Validation Node has been created.');
     // Assert that we're still on form due to to validation error.
     $this->assertSession()->addressEquals('node/add/ief_simple_single');
 
@@ -159,7 +159,7 @@ public function testSimpleValidation() {
     $assert_session->elementExists('xpath', $positive_int_field_xpath)->setValue(-1);
     $page->pressButton('Save');
     // Assert field validation fires on Inline Entity Form widget.
-    $assert_session->pageTextNotContains('IEF single simple Host Validation Node has been created.');
+    $assert_session->pageTextNotContains('IEF simple single Host Validation Node has been created.');
     // Assert that we're still on form due to to validation error.
     $this->assertSession()->addressEquals('node/add/ief_simple_single');
 
@@ -169,7 +169,7 @@ public function testSimpleValidation() {
     $assert_session->pageTextNotContains('Title field is required.');
     // Assert field validation fires on Inline Entity Form widget.
     $assert_session->pageTextNotContains('Positive int must be higher than or equal to 1');
-    $assert_session->pageTextContains('IEF single simple Host Validation Node has been created.');
+    $assert_session->pageTextContains('IEF simple single Host Validation Node has been created.');
 
     // Check that nodes were created correctly.
     $host_node = $this->getNodeByTitle($host_node_title);
@@ -260,7 +260,7 @@ protected function checkEditAccess(NodeInterface $host_node, $number_of_items, $
       $child_node = $host_node->single[$delta]->entity;
       // Assert the form of child node with edit access is found.
       $delta_field = $assert_session->fieldExists("single[$delta][inline_entity_form][title][0][value]");
-      $this->assertContains($child_node->label(), $delta_field->getValue());
+      $this->assertStringContainsString($child_node->label(), $delta_field->getValue());
       $delta++;
     }
     // Check that there is NOT an extra "add" form when editing.
@@ -301,7 +301,7 @@ protected function checkEditAccess(NodeInterface $host_node, $number_of_items, $
       $edit["single[$delta][inline_entity_form][title][0][value]"] = $new_titles[$delta];
     }
     $this->drupalPostForm(NULL, $edit, t('Save'));
-    $assert_session->pageTextContains("IEF single simple {$host_node->label()} has been updated.");
+    $assert_session->pageTextContains("IEF simple single {$host_node->label()} has been updated.");
 
     // Reset cache for nodes.
     $node_ids = [$host_node->id()];
diff --git a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/TranslationTest.php b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/TranslationTest.php
index ef798794ea..f98f92b6a4 100644
--- a/web/modules/inline_entity_form/tests/src/FunctionalJavascript/TranslationTest.php
+++ b/web/modules/inline_entity_form/tests/src/FunctionalJavascript/TranslationTest.php
@@ -16,7 +16,7 @@ class TranslationTest extends InlineEntityFormTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'content_translation',
     'inline_entity_form_translation_test',
     'language',
@@ -25,7 +25,7 @@ class TranslationTest extends InlineEntityFormTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->user = $this->createUser([
-- 
GitLab