diff --git a/.DS_Store b/.DS_Store index 4f70605..63c8967 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/tests/.DS_Store b/tests/.DS_Store index 3ba280f..d0f3b7a 100644 Binary files a/tests/.DS_Store and b/tests/.DS_Store differ diff --git a/tests/src/Functional/JSONFieldProcessorConfigReferenceTest.php b/tests/src/Functional/JSONFieldProcessorConfigReferenceTest.php deleted file mode 100644 index 9d1ede9..0000000 --- a/tests/src/Functional/JSONFieldProcessorConfigReferenceTest.php +++ /dev/null @@ -1,105 +0,0 @@ -assertSession(); - - // Create a new content type for testing. - $type = $this->createContentType(); - - // Log in as a user with permissions to create content and administer fields. - $this->drupalLogin($this->createUser([ - 'create ' . $type->id() . ' content', - 'administer node fields', - ])); - - // Go to the "manage fields" section of a content entity. - $this->drupalGet('admin/structure/types/manage/' . $type->id() . '/fields'); - $assert->statusCodeEquals(200); - - // Click on the "add field" button. - $this->clickLink('Create a new field'); - - // Select "Reference" as the field type and choose "other". - // Add a label and click continue. - $this->submitForm([ - 'new_storage_type' => 'reference', - ], 'Continue'); - $this->submitForm([ - 'entity_reference' => 'entity_reference', - 'label' => 'json_field_processor_config Reference', - ], 'Continue'); - // Get the current page HTML. - $html = $this->getSession()->getPage()->getHtml(); - - // Print the page HTML to debug what is rendered. - print('
' . htmlspecialchars($html) . ''); - $this->submitForm([ - 'settings-handler-settings-target-bundles-islandora-object' => $type->id(), - ], "Save settings"); - - $assert->statusCodeEquals(200); - - // Select "json_field_processor_config" as the target type. - $this->submitForm([ - 'settings[target_type]' => 'json_field_processor_config', - ], 'Save field settings'); - $assert->statusCodeEquals(200); - - // Load a json_field_processor_config entity to reference. - $json_field_processor_config = JSONFieldProcessorConfig::loadMultiple(); - // Get the first available config entity. - $json_field_processor_config = reset($json_field_processor_config); - - // Create a new node of the created content type. - $this->drupalGet(Url::fromRoute('node.add', ['node_type' => $type->id()])); - $this->submitForm([ - 'title[0][value]' => 'Test Node Title', - 'field_json_field_processor_config_reference[0][target_id]' => $json_field_processor_config->id(), - // Ensure this button is correctly targeted. - ], 'Save'); - $assert->statusCodeEquals(200); - - // Verify that the json_field_processor_config label is present in the node. - $assert->pageTextContains($json_field_processor_config->label()); - } - -}