Skip to content

Commit

Permalink
Removed the close button
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Sep 11, 2023
1 parent 3fcfd03 commit 72b14b0
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 26 deletions.
2 changes: 0 additions & 2 deletions features/standard/Autosave.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Feature: Content Items creation
| Title | Test Article Autosave draft |
| Short title | Test Article Autosave draft |
And I wait for Content Item to be autosaved
And I click on the close button
And I open the "Dashboard" page in admin SiteAccess
Then there's draft "Test Article Autosave draft" on Dashboard list

Expand All @@ -47,6 +46,5 @@ Feature: Content Items creation
| Title | Test Article Autosave Off draft |
| Short title | Test Article Autosave Off draft |
And I check if "Autosave is off" notification is displayed
And I click on the close button
And I open the "Dashboard" page in admin SiteAccess
Then there's no draft "Test Article Autosave Off draft" on Dashboard list
4 changes: 2 additions & 2 deletions features/standard/ContentDraft.feature
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Feature: Content items creation
And there's draft "TestDraftDashboardEdit" on Dashboard list
And I start editing content draft "TestDraftDashboardEdit"
And I should be on Content update page for "TestDraftDashboardEdit"
When I click on the close button
And I should be on Content view Page for root
When I perform the "Delete draft" action
Then I should be on Content view Page for root

@javascript @APIUser:admin
Scenario: Content draft can be created and published through draft list modal
Expand Down
8 changes: 0 additions & 8 deletions src/lib/Behat/BrowserContext/ContentUpdateContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,6 @@ public function verifyFieldsAreSet(TableNode $table): void
}
}

/**
* @When I click on the close button
*/
public function iClickCloseButton(): void
{
$this->contentUpdateItemPage->close();
}

/**
* @When I switch to :tabName field group
*/
Expand Down
5 changes: 0 additions & 5 deletions src/lib/Behat/Component/ContentActionsMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@

class ContentActionsMenu extends Component
{
use \Ibexa\Behat\Core\Debug\InteractiveDebuggerTrait;

public function clickButton(string $buttonName, ?string $groupName = null): void
{
// $this->setInteractiveBreakpoint(get_defined_vars());

if ($groupName === null) {
$this->clickStandaloneButton($buttonName);

Expand Down Expand Up @@ -63,7 +59,6 @@ private function clickButtonInGroup(string $groupName, string $buttonName): void
if ($group->any()) {
$group->single()->find($this->getLocator('toggle'))->click();

// $this->setInteractiveBreakpoint(get_defined_vars());
$this->getHTMLPage()->findAll($this->getLocator('button'))
->getByCriterion(new ElementTextCriterion($buttonName))
->click();
Expand Down
9 changes: 0 additions & 9 deletions src/lib/Behat/Page/ContentUpdateItemPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Ibexa\AdminUi\Behat\Component\Fields\FieldTypeComponent;
use Ibexa\AdminUi\Behat\Component\Notification;
use Ibexa\Behat\API\Facade\ContentFacade;
use Ibexa\Behat\Browser\Element\Condition\ElementExistsCondition;
use Ibexa\Behat\Browser\Element\Condition\ElementHasTextCondition;
use Ibexa\Behat\Browser\Element\Criterion\ElementTextCriterion;
use Ibexa\Behat\Browser\Element\Criterion\ElementTextFragmentCriterion;
Expand Down Expand Up @@ -94,13 +93,6 @@ public function fillFieldWithValue(string $label, array $value, ?int $fieldPosit
$this->getField($label, $fieldPosition)->setValue($value);
}

public function close(): void
{
$this->getHTMLPage()->setTimeout(3)
->waitUntilCondition(new ElementExistsCondition($this->getHTMLPage(), $this->getLocator('closeButton')));
$this->getHTMLPage()->find($this->getLocator('closeButton'))->click();
}

public function verifyValidationMessage(string $fieldName, string $expectedMessage): void
{
$this->getField($fieldName)->verifyValidationMessage($expectedMessage);
Expand All @@ -111,7 +103,6 @@ protected function specifyLocators(): array
return [
new VisibleCSSLocator('pageTitle', '.ibexa-edit-header__title'),
new VisibleCSSLocator('formElement', 'form.ibexa-form, .ibexa-edit-content'),
new VisibleCSSLocator('closeButton', '.ibexa-anchor-navigation-menu__close'),
new VisibleCSSLocator('nthField', 'div.ibexa-field-edit:nth-of-type(%s)'),
new VisibleCSSLocator('nthFieldWithSection', '[data-id="%s"] div.ibexa-field-edit:nth-of-type(%s)'),
new VisibleCSSLocator('fieldGroupNthField', '[data-id="%s"] div.ibexa-field-edit:nth-of-type(%s)'),
Expand Down

0 comments on commit 72b14b0

Please sign in to comment.