-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EZP-32212: Changed class to correct recognition ezmatrix fieldType #1662
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Why is this diff different from the current state of this file in 1.5 branch?
https://github.com/ezsystems/ezplatform-admin-ui/blob/1.5/src/lib/Behat/PageElement/ContentField.php#L46-L63
There's a condition missing for ezuser.
Ezmatrix tests will now share the same selector with ezmatrix and the one for ezmatrix will be more generic, so the condition for ezuser should be first, something like this should be ok:
private function getFieldTypeIdentifier(string $fieldClass): string
{
if ($fieldClass === '') {
return 'ezboolean';
}
if ($fieldClass === 'ez-scrollable-table-wrapper mb-0') {
return 'ezuser';
}
if (strpos($fieldClass, 'ez-scrollable-table-wrapper') !== false) {
return 'ezmatrix';
}
preg_match($this::FIELD_TYPE_CLASS_REGEX, $fieldClass, $matches);
$matchedValue = explode('-', $matches[0])[0];
return $matchedValue;
}
…e-behat-test' into EZP-32212-ezmatrix-overflow-table-behat-test # Conflicts: # src/lib/Behat/PageElement/ContentField.php
corrected, I have forgotten git pull before creating this branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Could you please merge up changes @mateuszdebinski ? |
Related PR: ezsystems/ezplatform-matrix-fieldtype#45
Passed tests: https://travis-ci.com/github/ezsystems/ezplatform-page-builder/builds/207258337
Checklist:
$ composer fix-cs
)