diff --git a/src/lib/Behat/PageElement/ContentField.php b/src/lib/Behat/PageElement/ContentField.php index ea97556b93..e3b96eba34 100644 --- a/src/lib/Behat/PageElement/ContentField.php +++ b/src/lib/Behat/PageElement/ContentField.php @@ -45,7 +45,11 @@ public function verifyFieldHasValue(string $label, array $value): void private function getFieldType(string $fieldClass): string { - if (strpos($fieldClass, 'ez-table') !== false) { + if ($fieldClass === 'ez-scrollable-table-wrapper mb-0') { + return 'ezuser'; + } + + if (strpos($fieldClass, 'ez-scrollable-table-wrapper') !== false) { return 'ezmatrix'; } @@ -53,10 +57,6 @@ private function getFieldType(string $fieldClass): string return 'ezboolean'; } - if ($fieldClass === 'ez-scrollable-table-wrapper mb-0') { - return 'ezuser'; - } - preg_match($this::FIELD_TYPE_CLASS_REGEX, $fieldClass, $matches); return explode('-', $matches[0])[0];