-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* EZEE-1836: DBP is passing * EZEE-1836: FlexWF passing * EZEE-1836: Form manager before rebasing * EZEE-1836: All tests passing * EZEE-1836: Changes before review * EZEE-1836: Change Travis settings * EZEE-1836: Changes after review * EZEE-1836: Remove email notification setting
- Loading branch information
Showing
15 changed files
with
225 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (C) eZ Systems AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
namespace EzSystems\EzPlatformAdminUi\Behat\PageElement; | ||
|
||
use EzSystems\EzPlatformAdminUi\Behat\Helper\UtilityContext; | ||
|
||
class LanguagePicker extends Element | ||
{ | ||
public function __construct(UtilityContext $context) | ||
{ | ||
parent::__construct($context); | ||
$this->fields = [ | ||
'languageSelector' => '#content_edit_language .form-check-label', | ||
]; | ||
} | ||
|
||
public function chooseLanguage($language) | ||
{ | ||
$this->context->getElementByText($language, $this->fields['languageSelector'])->click(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (C) eZ Systems AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
namespace EzSystems\EzPlatformAdminUi\Behat\PageElement; | ||
|
||
use EzSystems\EzPlatformAdminUi\Behat\Helper\UtilityContext; | ||
use PHPUnit\Framework\Assert; | ||
|
||
class LeftMenu extends Element | ||
{ | ||
public function __construct(UtilityContext $context) | ||
{ | ||
parent::__construct($context); | ||
$this->fields = [ | ||
'buttonSelector' => '.ez-sticky-container .btn', | ||
'menuSelector' => '.ez-side-menu', | ||
]; | ||
} | ||
|
||
/** | ||
* Clicks a button on the left menu (Search, Browse, Trash). | ||
* | ||
* @param string $buttonName | ||
*/ | ||
public function clickButton(string $buttonName) | ||
{ | ||
$this->context->getElementByText($buttonName, $this->fields['buttonSelector'])->click(); | ||
} | ||
|
||
public function verifyVisibility(): void | ||
{ | ||
Assert::assertTrue($this->context->findElement($this->fields['menuSelector'])->isVisible()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (C) eZ Systems AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
namespace EzSystems\EzPlatformAdminUi\Behat\PageElement; | ||
|
||
use EzSystems\EzPlatformAdminUi\Behat\Helper\UtilityContext; | ||
use PHPUnit\Framework\Assert; | ||
|
||
class UniversalDiscoveryWidget extends Element | ||
{ | ||
public function __construct(UtilityContext $context) | ||
{ | ||
parent::__construct($context); | ||
$this->fields = [ | ||
'tabSelector' => '.c-tab-nav-item', | ||
'confirmButton' => '.m-ud__action--confirm', | ||
'selectContentButton' => '.c-meta-preview__btn--select', | ||
'elementSelector' => '.c-finder-tree-branch:nth-of-type(%d) .c-finder-tree-leaf', | ||
]; | ||
} | ||
|
||
/** | ||
* @param string $itemPath | ||
*/ | ||
public function selectContent(string $itemPath): void | ||
{ | ||
$pathParts = explode('/', $itemPath); | ||
$depth = 1; | ||
foreach ($pathParts as $part) { | ||
$this->context->getElementByText($part, sprintf($this->fields['elementSelector'], $depth))->click(); | ||
++$depth; | ||
} | ||
|
||
$this->context->findElement($this->fields['selectContentButton'])->click(); | ||
} | ||
|
||
public function confirm(): void | ||
{ | ||
$this->context->getElementByText('Confirm', $this->fields['confirmButton'])->click(); | ||
} | ||
|
||
public function verifyVisibility(): void | ||
{ | ||
$this->assertExpectedTabsExist(); | ||
} | ||
|
||
private function assertExpectedTabsExist(): void | ||
{ | ||
$expectedTabTitles = ['Browse', 'Search']; | ||
|
||
$actualTabTitles = []; | ||
$tabs = $this->context->findAllWithWait($this->fields['tabSelector']); | ||
foreach ($tabs as $tab) { | ||
$actualTabTitles[] = $tab->getText(); | ||
} | ||
|
||
Assert::assertArraySubset($expectedTabTitles, $actualTabTitles); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters