Problem/Motivation

In #2902164-53: Controlled-by fields inside a Paragraph don't work, @josephleon and myself are adding support for paragraphs in conditional_fields. We are taking a test-driven approach, i.e.: write the test first, then fix the issue.

In order for us to test this, we need both conditional_fields and paragraphs installed when we run tests, but we don't want to make conditional_fields depend on paragraphs for regular users.

Drupal.org allows you to handle the case where you want a module installed during testbot tests, but not require the module for regular users, i.e.: so you can test integration between two modules, by adding a test_dependencies section to your module's .info.yml file.

However, there's a big limitation - adding a test_dependencies section in the same patch that you add tests that use that dependency is not allowed - the test_dependencies section must already be in the branch before you can write tests that use the dependency, and a new -dev release must have already been rolled out for changes in the branch (once every 24 hours). For more information, see the following documentation:

  1. "test_dependencies" point in "Complete example" section of "Let Drupal know about your module with an .info.yml file"
  2. "Dependencies for tests" in Managing dependencies for a contributed project"
  3. "Tests pass locally but fail when run by drupal.org's testbot" section of "Running PHPUnit tests"

Proposed resolution

Add...

test_dependencies:
  - paragraphs:paragraphs

... to conditional_fields.info.yml.

Remaining tasks

  1. Write a patch
  2. Review and feedback
  3. RTBC and feedback
  4. Commit
  5. (Wait for dev release to happen?)

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

mparker17 created an issue. See original summary.

mparker17’s picture

Status: Active » Needs review
StatusFileSize
new597 bytes

Here's a patch. Reviews welcome.

mparker17’s picture

Status: Needs review » Reviewed & tested by the community

Testbot likes this patch, it makes good use of the Drupal API and doesn't introduce any coding standards violations, and there's no way to test manually right now, so I'm RTBCing.

  • mparker17 committed 5ae3db4 on 8.x-1.x
    Issue #3192790 by mparker17: Add paragraphs to test_dependencies in ....
mparker17’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Committed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.