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:
- "test_dependencies" point in "Complete example" section of "Let Drupal know about your module with an .info.yml file"
- "Dependencies for tests" in Managing dependencies for a contributed project"
- "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
Write a patchReview and feedbackRTBC and feedbackCommit- (Wait for dev release to happen?)
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3192790-2--add-paragraphs-as-test-dep.patch | 597 bytes | mparker17 |
Comments
Comment #2
mparker17Here's a patch. Reviews welcome.
Comment #3
mparker17Testbot 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.
Comment #5
mparker17Committed!