- Issue created by @sokru
- 🇫🇮Finland sokru
Created a MR that fixes the issue, but this module would greatly benefit for tests for this feature.
- First commit to issue fork.
- 🇺🇦Ukraine dlevchik
Tested manually, fixed attributions display for multiple cardinality fields. Created first FunctionalJavascriptTests test - NodeAjaxTest. The idea is to fill the field on test, wait for AJAX to finish, check the icon and save the node. Test this with the assertions. Later, create AJAX test for multiple cardinality fields.
The problem is, since I don't have a lot of experience with testing, the test is currently fails:
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for field.storage.node.svg_test_field with the following errors: field.storage.node.svg_test_field:settings.max_length missing schema, field.storage.node.svg_test_field:settings.source missing schema, field.storage.node.svg_test_field:settings.is_ascii missing schema, field.storage.node.svg_test_field:settings.case_sensitive missing schema
I can't wrap my head on how to fix it. I've used some other core modules as an examples, and they don't seem to use any specific fixes for this error
Would greatly appreciate the help!
- 🇺🇦Ukraine dlevchik
Fixed module settings schema by providing svg_icon_field.schema.yml, fixed the test and added multiple cardinality test.
Time: 00:11.304, Memory: 10.00 MB
OK (2 tests, 20 assertions)
Since I'm no test guru at all, I kindly ask to review and point out the issues
- 🇵🇱Poland dawid_nawrot
I'm not an expert in test either, but thanks for contribution. Maybe someone who is more familiar with testing will show up and confirm if this is fine and if so I will merge it and prepare new release.