Skip to content

Commit

Permalink
EZP-32212: Changed class to correct recognition ezmatrix fieldType (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszdebinski committed Dec 10, 2020
1 parent aec1dc3 commit 10fc13a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/Behat/PageElement/ContentField.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ 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';
}

if (!$fieldClass) {
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];
Expand Down

0 comments on commit 10fc13a

Please sign in to comment.