Skip to content

Commit

Permalink
fix "Callback" action in /demos/data-action/jsactionsgrid.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Mar 27, 2024
1 parent 5ce61ea commit 41d5803
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/UserAction/JsCallbackExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ public function getAction(): Model\UserAction
public function setAction(Model\UserAction $action)
{
$this->action = $action;
if (!$this->action->enabled && $this->getOwner() instanceof View) { // @phpstan-ignore-line
$this->getOwner()->addClass('disabled');
}

return $this;
}
Expand Down
7 changes: 7 additions & 0 deletions tests-behat/useraction.feature
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@ Feature: UserAction executor and UserConfirmation modal
When I fill field using "//input[../div[text()='Greet']]" with "Laura"
When I press button "Greet"
Then Toast display should contain text "Hello Laura"

Scenario: testing JsCallbackExecutor in grid menu
Given I am on "data-action/jsactionsgrid.php"
When I click using selector "//tr[td[text()='Argentina']]//div.ui.dropdown[div[text()='Actions...']]"
Then No toast should be displayed
When I click using selector "//tr[td[text()='Argentina']]//div.ui.dropdown[div[text()='Actions...']]//div.menu/div[text()='Callback']"
Then Toast display should contain text "Success: callback execute using country Argentina"

0 comments on commit 41d5803

Please sign in to comment.