Skip to content
Snippets Groups Projects

Issue #3353177: Form field: Validation error at wrong field using inline forms

Merged mxh requested to merge issue/eca-3353177:3353177-form-field-validation into 1.2.x
2 files
+ 24
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -161,7 +161,7 @@ class BpmnBaseModellerTest extends Base {
else {
$name = $property['binding']['name'];
$label = $property['label'];
$this->assertEquals(self::getExpectedOptionFields($name, $label, $property['value'], $property['choices'], $property['description'] ?? ''),
$this->assertEquals(self::getExpectedOptionFields($name, $label, $property['value'], $property['choices'], $property['description'] ?? '', $property['constraints'] ?? NULL),
$property, "Option list $name for plugin $label should be properly prepared.");
}
}
@@ -182,11 +182,13 @@ class BpmnBaseModellerTest extends Base {
* The available options for the field.
* @param string $description
* The optional description.
* @param array|null $constraints
* The optional constraints.
*
* @return array
* The expected option field definition.
*/
private static function getExpectedOptionFields(string $name, string $label, string $value, array $choices, string $description): array {
private static function getExpectedOptionFields(string $name, string $label, string $value, array $choices, string $description, ?array $constraints): array {
$options = [
'label' => $label,
'type' => 'Dropdown',
@@ -201,6 +203,9 @@ class BpmnBaseModellerTest extends Base {
if (!empty($description)) {
$options['description'] = $description;
}
if (isset($constraints)) {
$options['constraints'] = $constraints;
}
return $options;
}
Loading