Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/lib/Behat/Component/Fields/Matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
namespace Ibexa\AdminUi\Behat\Component\Fields;

use Ibexa\Behat\Browser\Element\Mapper\ElementTextMapper;
use Ibexa\Behat\Browser\Locator\CSSLocatorBuilder;
use Ibexa\Behat\Browser\Locator\LocatorInterface;
use Ibexa\Behat\Browser\Locator\VisibleCSSLocator;
use PHPUnit\Framework\Assert;
Expand Down Expand Up @@ -54,7 +53,6 @@ public function getFieldTypeIdentifier(): string
protected function specifyLocators(): array
{
return [
new VisibleCSSLocator('matrixCellSelectorFormat', '[name="ezplatform_content_forms_content_edit[fieldsData][ezmatrix][value][entries][%d][%s]"]'),
new VisibleCSSLocator('row', '.ibexa-table__row'),
new VisibleCSSLocator('addRowButton', '.ibexa-btn--add-matrix-entry'),
new VisibleCSSLocator('viewModeTableHeaders', 'thead th'),
Expand Down Expand Up @@ -94,11 +92,7 @@ private function addRows(int $numberOfRows): void

private function internalSetValue(int $rowIndex, string $column, $value): void
{
$matrixCellSelector = CSSLocatorBuilder::combine(
$this->getLocator('matrixCellSelectorFormat')->getSelector(),
new VisibleCSSLocator('rowIndex', (string) $rowIndex),
new VisibleCSSLocator('columnIndex', $column),
);
$matrixCellSelector = new VisibleCSSLocator('matrixCell', sprintf('[name="ezplatform_content_forms_content_edit[fieldsData][ezmatrix][value][entries][%d][%s]"]', $rowIndex, $column));

$this->getHTMLPage()->find($matrixCellSelector)->setValue($value);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Behat/Component/Table/TableBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function newTable(): self
new VisibleCSSLocator('empty', '.ibexa-table__empty-table-cell'),
new VisibleCSSLocator('columnHeader', '.ibexa-table__header-cell,th'),
new VisibleCSSLocator('row', 'tr'),
new VisibleCSSLocator('cell', '.ibexa-table__cell:nth-of-type(%d),td:nth-of-type(%d)'),
new VisibleCSSLocator('cell', 'div.ibexa-table__cell:nth-of-type(%d),td:nth-of-type(%d)'),
new VisibleCSSLocator('parent', '.ibexa-table'),
]);

Expand Down
4 changes: 2 additions & 2 deletions src/lib/Behat/Component/UniversalDiscoveryWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ protected function specifyLocators(): array
new VisibleCSSLocator('previewImage', '.c-content-meta-preview__preview'),
// selectors for path traversal
new CSSLocator('treeLevelFormat', '.c-finder-branch:nth-child(%d)'),
new CSSLocator('treeLevelElementsFormat', '.c-finder-branch:nth-of-type(%d) .c-finder-leaf'),
new CSSLocator('treeLevelElementsFormat', 'div.c-finder-branch:nth-of-type(%d) .c-finder-leaf'),
new CSSLocator('elementName', '.c-finder-leaf__name'),
new CSSLocator('input', '.c-udw-toggle-selection'),
new CSSLocator('treeLevelSelectedFormat', '.c-finder-branch:nth-of-type(%d) .c-finder-leaf--marked'),
new CSSLocator('treeLevelSelectedFormat', 'div.c-finder-branch:nth-of-type(%d) .c-finder-leaf--marked'),
// itemActions
new VisibleCSSLocator('contentPreview', '.c-content-meta-preview'),
new CSSLocator('editButton', '.c-content-edit-button__btn'),
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Behat/Page/ContentTypePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected function specifyLocators(): array
new VisibleCSSLocator('createButton', '.btn-icon .ibexa-icon--create'),
new VisibleCSSLocator('pageTitle', '.ibexa-page-title h1'),
new VisibleCSSLocator('contentTypeDataTable', '.ibexa-details .ibexa-table'),
new VisibleCSSLocator('contentFieldsTable', '.ibexa-fieldgroup:nth-of-type(2)'),
new VisibleCSSLocator('contentFieldsTable', 'section.ibexa-fieldgroup:nth-of-type(1)'),
new VisibleCSSLocator('globalPropertiesItem', '.ibexa-details__item'),
new VisibleCSSLocator('globalPropertiesLabel', '.ibexa-details__item-label'),
new VisibleCSSLocator('globalPropertiesValue', '.ibexa-details__item-content'),
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Behat/Page/ContentTypeUpdatePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function addFieldDefinition(string $fieldName)
$fieldSelector = new VisibleCSSLocator(
'field',
sprintf(
'.ibexa-available-field-types__list > li:not(.ibexa-available-field-type--hidden) .ibexa-available-field-type__content:nth-of-type(%d)',
'.ibexa-available-field-types__list > li:not(.ibexa-available-field-type--hidden) div.ibexa-available-field-type__content:nth-of-type(%d)',
$fieldPosition
)
);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Behat/Page/SystemInfoPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function getRoute(): string
protected function specifyLocators(): array
{
return [
new VisibleCSSLocator('packagesTable', '.tab-pane.active .ibexa-fieldgroup:nth-of-type(2)'),
new VisibleCSSLocator('packagesTable', '.tab-pane.active section.ibexa-fieldgroup:nth-of-type(1)'),
];
}

Expand Down