- Issue created by @phenaproxima
- π³π±Netherlands bbrala Netherlands
Not sure where you got
StringParts
from here? - πΊπΈUnited States phenaproxima Massachusetts
Came from XB. Should be in core.
- π³π±Netherlands bbrala Netherlands
Unfortunately a little optimistic:
π Convert field_storage_config and field_config's form validation logic to validation constraints Needs work found it here. Not yet part of core.
- π³π±Netherlands bbrala Netherlands
So guess this is kinda a child of that :x
- π³π±Netherlands bbrala Netherlands
Added the missing contraint and a basic first test.
- π³π±Netherlands bbrala Netherlands
Added latest code from XB, unfortunately for now we are failing on PluginExists suddenly. Not sure why yet.
- π³π±Netherlands bbrala Netherlands
Asjusted the expected interface for the entity type. Entitytypemanager returns the Entity class, not the type class. So changed the interface we check for.
Also was missing a required option in the config_test.
- π³π±Netherlands bbrala Netherlands
Only 2 failing tests it seems, because of missing adjustments in the tests using config_test. I added a new key, and that resulted in some changes in the
TypedConfigTest
- π³π±Netherlands bbrala Netherlands
Only unrealated failure on the database left! Yay!
- π§πͺBelgium borisson_ Mechelen, π§πͺ
I have one question on the MR.
- π³π±Netherlands bbrala Netherlands
You are right. If we want to check for fieldable, we should actually check for that interface. Adjusted. Setting to NR (although tests are running still).
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Oh: the one thing I could complain about is that neither
FieldConfig
norBaseFieldOverride
(both of these config entity types are made fully validatable as of this issue) have their test coverage updated (FieldConfigValidationTest
) to verify a sensible error is thrown.StringPartsConstraintValidatorTest
exists, but doesn't actually test the generated validation error.IMHO both config entity types should get a trivial bit of test coverage similar to
\Drupal\Tests\experience_builder\Kernel\Config\ComponentValidationTest::testInvalidId()
. - π³π±Netherlands bbrala Netherlands
Thanks for the review :) I'll have a go to update test.
Also see if i can create some followups for
- EntityViewMode
- EntityFormMode
- EntityViewDisplay
- EntityFormDisplay
- π³π±Netherlands bbrala Netherlands
Tried a few things to get FieldConfigValidationTest to work, didnt get it to do what i like. Cannot mutate id field, and not getting later errors there. Even tried to remove the Immutable property, but didnt get it there.
I added a test for the message in the
testStringPartsConstraint
so i covered it from that side i guess? - π§πͺBelgium borisson_ Mechelen, π§πͺ
To me, it seems like this is sufficient test coverage
The Needs Review Queue Bot β tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.