Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabowskiM committed Sep 12, 2022
1 parent 87e172d commit 86e3bdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/bundle/Resources/encore/ibexa.js.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const layout = [
path.resolve(__dirname, '../public/js/scripts/autogenerate.identifier.js'),
path.resolve(__dirname, '../public/js/scripts/admin.back.to.top.js'),
path.resolve(__dirname, '../public/js/scripts/admin.middle.ellipsis.js'),
path.resolve(__dirname, '../public/js/scripts/admin.anchor.sections.navigation'),
path.resolve(__dirname, '../public/js/scripts/widgets/flatpickr.js'),
];
const fieldTypes = [];
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Behat/Page/AdminUpdateItemPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function specifyLocators(): array
new VisibleCSSLocator('formElement', '.ibexa-main-container '),
new VisibleCSSLocator('closeButton', '.ibexa-content-edit-container__close'),
new VisibleCSSLocator('button', '.container button'),
new VisibleCSSLocator('tab', '.ibexa-anchor-navigation-menu__item'),
new VisibleCSSLocator('tab', '.ibexa-anchor-navigation-menu__sections-item'),
new VisibleCSSLocator('fieldInput', 'input'),
];
}
Expand Down
6 changes: 3 additions & 3 deletions src/lib/Behat/Page/ContentUpdateItemPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected function specifyLocators(): array
new VisibleCSSLocator('fieldGroupNthField', '[data-id="%s"] .ibexa-field-edit:nth-of-type(%s)'),
new VisibleCSSLocator('noneditableFieldClass', 'ibexa-field-edit--eznoneditable'),
new VisibleCSSLocator('fieldOfType', '.ibexa-field-edit--%s'),
new VisibleCSSLocator('navigationTabs', '.ibexa-anchor-navigation-menu__item'),
new VisibleCSSLocator('navigationTabs', '.ibexa-anchor-navigation-menu__sections-item'),
new VisibleCSSLocator('autosaveIsOnInfo', '.ibexa-autosave__status-on'),
new VisibleCSSLocator('autosaveSavedInfo', '.ibexa-autosave__status-saved'),
new VisibleCSSLocator('autosaveIsOffInfo', '.ibexa-autosave__status-off'),
Expand Down Expand Up @@ -127,7 +127,7 @@ public function getField(string $fieldName): FieldTypeComponent

protected function getFieldPosition(string $fieldName): int
{
$activeSections = $this->getHTMLPage()->findAll(new VisibleCSSLocator('activeSection', '.ibexa-anchor-navigation-menu__item-btn--active'));
$activeSections = $this->getHTMLPage()->findAll(new VisibleCSSLocator('activeSection', '.ibexa-anchor-navigation-menu__sections-item-btn--active'));
$fieldLabelLocator = $activeSections->any() ?
new VisibleCSSLocator(
'fieldLabelWithCategories',
Expand Down Expand Up @@ -184,7 +184,7 @@ public function switchToFieldGroup(string $tabName): void

public function verifyFieldCannotBeEditedDueToLimitation(string $fieldName)
{
$activeSections = $this->getHTMLPage()->findAll(new VisibleCSSLocator('activeSection', '.ibexa-anchor-navigation-menu__item-btn--active'));
$activeSections = $this->getHTMLPage()->findAll(new VisibleCSSLocator('activeSection', '.ibexa-anchor-navigation-menu__sections-item-btn--active'));
$fieldLocator = new VisibleCSSLocator('', sprintf($this
->getLocator('fieldGroupNthField')->getSelector(), $activeSections->single()->getAttribute('data-anchor-target-section-id'), $this->getFieldPosition($fieldName)));
$this->getHTMLPage()->find($fieldLocator)->assert()->hasClass('ibexa-field-edit--disabled');
Expand Down

0 comments on commit 86e3bdc

Please sign in to comment.