-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #407 from smildev/feature/panther
Add support for panther extension
- Loading branch information
Showing
13 changed files
with
195 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ | |
/behat.yml | ||
/phpspec.yml | ||
|
||
/drivers/ | ||
|
||
###> symfony/framework-bundle ### | ||
/.env.*.local | ||
/.env.local | ||
|
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,31 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Monofony package. | ||
* | ||
* (c) Monofony | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Monofony\Bridge\Behat\Service; | ||
|
||
use Behat\Mink\Driver\DriverInterface; | ||
use Behat\Mink\Driver\PantherDriver; | ||
use Behat\Mink\Driver\Selenium2Driver; | ||
use DMore\ChromeDriver\ChromeDriver; | ||
|
||
final class DriverHelper | ||
{ | ||
public static function isJavascriptSession(DriverInterface $driver): bool | ||
{ | ||
return | ||
$driver instanceof Selenium2Driver | ||
|| $driver instanceof ChromeDriver | ||
|| $driver instanceof PantherDriver | ||
; | ||
} | ||
} |
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,33 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Monofony package. | ||
* | ||
* (c) Monofony | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Monofony\Bridge\Behat\Service; | ||
|
||
use Behat\Mink\Element\DocumentElement; | ||
use Behat\Mink\Session; | ||
|
||
abstract class JQueryHelper | ||
{ | ||
public static function waitForAsynchronousActionsToFinish(Session $session): void | ||
{ | ||
$session->wait(1000, 'typeof jQuery !== "undefined" && 0 === jQuery.active'); | ||
} | ||
|
||
public static function waitForFormToStopLoading(DocumentElement $document, int $timeout = 10): void | ||
{ | ||
$form = $document->find('css', 'form'); | ||
$document->waitFor($timeout, function () use ($form) { | ||
return !$form->hasClass('loading'); | ||
}); | ||
} | ||
} |
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
29 changes: 29 additions & 0 deletions
29
...Monofony/MetaPack/CoreMeta/.recipe/templates/bundles/SyliusUiBundle/Macro/table.html.twig
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,29 @@ | ||
{% extends "@!SyliusUi/Macro/table.html.twig" %} | ||
|
||
{% macro row(grid, definition, row) %} | ||
<tr class="item" {{ sylius_test_html_attribute('row') }}> | ||
{% if definition.actionGroups.bulk is defined and definition.getEnabledActions('bulk')|length > 0 %} | ||
<td class="center aligned"><input class="bulk-select-checkbox" name="bulk-select-checkbox-{{ row.id }}" type="checkbox" value="{{ row.id }}" /></td> | ||
{% endif %} | ||
{% for field in definition.enabledFields|sort_by('position') %} | ||
<td>{{ sylius_grid_render_field(grid, field, row) }}</td> | ||
{% endfor %} | ||
{% if definition.actionGroups.item is defined and definition.getEnabledActions('item')|length > 0 %} | ||
<td {{ sylius_test_html_attribute('actions') }}> | ||
<div class="ui buttons"> | ||
{% for action in definition.getEnabledActions('item')|sort_by('position') %} | ||
{{ sylius_grid_render_action(grid, action, row) }} | ||
{% endfor %} | ||
</div> | ||
{% if definition.actionGroups.subitem is defined and definition.getEnabledActions('subitem')|length > 0 %} | ||
<div class="ui divider"></div> | ||
<div class="ui buttons"> | ||
{% for action in definition.getEnabledActions('subitem')|sort_by('position') %} | ||
{{ sylius_grid_render_action(grid, action, row) }} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
</td> | ||
{% endif %} | ||
</tr> | ||
{% endmacro %} |
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