- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
Should be a quick thing, when using a good template to start. ETA: 30min
We won't test the animation itself, of course.
- 🇩🇪Germany lrwebks Porta Westfalica
Changes to the tests as well as new tests done, however phpunit does not seem to be overly happy about the schema for the conditions.
I see two options here:
1. Define the schema differently (I am not that familiar with the dynamic schema for conditions though)
2. Use the actual settings page to change the settings in the tests (Not a friend of that since it should also work when changed via configFactory)Any suggestions on how to proceed?
- 🇩🇪Germany Anybody Porta Westfalica
Our current implementation is very similar to what block.schema.yml implements:
visibility: type: sequence label: 'Visibility Conditions' sequence: type: condition.plugin.[id] label: 'Visibility Condition'
So I can't see major differences and think the mistake might not be on our side, but on the side of the condition plugin that causes this issue?
- 🇩🇪Germany Anybody Porta Westfalica
I compared everything to
web/core/modules/system/tests/modules/condition_test/
and it looks fine, so I think this is test-specific.Looking at the condition tests, I saw they were using the "system" module! Perhaps that's what we need.
If it's not enough, we could check ifcondition_test
test module dependency is required, but I don't think so. - 🇩🇪Germany Anybody Porta Westfalica
Yeah it's definitely from the "system" module and it defines the schema correctly:
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/syste...
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/config/schema...negate etc. are inherited!
It totally makes sense to require the "system" module though, as it's where request_path Condition Plugin is implemented:
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/syste...But no more idea, why it still doesn't fix the failing tests.
- 🇩🇪Germany Anybody Porta Westfalica
Okay I'm going to merge the tests now, as they work as expected. No more idea what's causing the schema to fail, but let's solve this one day...
- 🇩🇪Germany Anybody Porta Westfalica
Okay sadly lots of time wasted. If we just had a look at the line, where the Schema error is reported, we'd have seen that this is NOT a schema error, but a bug in the tests implementation...
On it!
- 🇩🇪Germany Anybody Porta Westfalica
Okay all green now. I believe the other tests fail because of 🐛 Drupal Current theme condition plugin should provide an option to select all themes Needs review
Follow-Up: https://www.drupal.org/project/tab_title_attention/issues/3485667 📌 Re-add tests once core issue for theme condition is fixed Postponed
Automatically closed - issue fixed for 2 weeks with no activity.