|
9 | 9 | namespace Ibexa\AdminUi\Behat\Component\Fields; |
10 | 10 |
|
11 | 11 | use Ibexa\Behat\Browser\Element\Mapper\ElementTextMapper; |
12 | | -use Ibexa\Behat\Browser\Locator\CSSLocatorBuilder; |
13 | 12 | use Ibexa\Behat\Browser\Locator\LocatorInterface; |
14 | 13 | use Ibexa\Behat\Browser\Locator\VisibleCSSLocator; |
15 | 14 | use PHPUnit\Framework\Assert; |
@@ -54,7 +53,6 @@ public function getFieldTypeIdentifier(): string |
54 | 53 | protected function specifyLocators(): array |
55 | 54 | { |
56 | 55 | return [ |
57 | | - new VisibleCSSLocator('matrixCellSelectorFormat', '[name="ezplatform_content_forms_content_edit[fieldsData][ezmatrix][value][entries][%d][%s]"]'), |
58 | 56 | new VisibleCSSLocator('row', '.ibexa-table__row'), |
59 | 57 | new VisibleCSSLocator('addRowButton', '.ibexa-btn--add-matrix-entry'), |
60 | 58 | new VisibleCSSLocator('viewModeTableHeaders', 'thead th'), |
@@ -94,11 +92,7 @@ private function addRows(int $numberOfRows): void |
94 | 92 |
|
95 | 93 | private function internalSetValue(int $rowIndex, string $column, $value): void |
96 | 94 | { |
97 | | - $matrixCellSelector = CSSLocatorBuilder::combine( |
98 | | - $this->getLocator('matrixCellSelectorFormat')->getSelector(), |
99 | | - new VisibleCSSLocator('rowIndex', (string) $rowIndex), |
100 | | - new VisibleCSSLocator('columnIndex', $column), |
101 | | - ); |
| 95 | + $matrixCellSelector = new VisibleCSSLocator('matrixCell', sprintf('[name="ezplatform_content_forms_content_edit[fieldsData][ezmatrix][value][entries][%d][%s]"]', $rowIndex, $column)); |
102 | 96 |
|
103 | 97 | $this->getHTMLPage()->find($matrixCellSelector)->setValue($value); |
104 | 98 | } |
|
0 commit comments