Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more tests
Browse files Browse the repository at this point in the history
mvorisek committed Jan 29, 2025
1 parent 4f76872 commit a1d0fbd
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions demos/_unit-test/element-remove-observer.php
Original file line number Diff line number Diff line change
@@ -51,7 +51,9 @@

Button::addTo($app, ['Add A handler'])->on('click', $makeAddHandlerJsFx($viewA));
Button::addTo($app, ['Add I handler'])->on('click', $makeAddHandlerJsFx($viewI));
Button::addTo($app, ['Add U handler'])->on('click', $makeAddHandlerJsFx($viewU));
Button::addTo($app, ['Add V handler'])->on('click', $makeAddHandlerJsFx($viewV));

Button::addTo($app, ['Reload I'])->on('click', $viewI->jsReload($reloadUrlArgs));
Button::addTo($app, ['Reload U'])->on('click', $viewU->jsReload($reloadUrlArgs));
Button::addTo($app, ['Reload V'])->on('click', $viewV->jsReload($reloadUrlArgs));
8 changes: 7 additions & 1 deletion tests-behat/element-remove-observer.feature
Original file line number Diff line number Diff line change
@@ -11,20 +11,26 @@ Feature: Element remove observer
Then I check if input value for "#log" match text "A0 I0 U0 V0 J0 V1 V2 I3 U3 V3"
When I fill field using "#log" with ""
When I press button "Add A handler"
When I press button "Add U handler"
When I press button "Reload V"
Then I check if input value for "#log" match text "V4"
When I press button "Add V handler"
When I press button "Reload V"
Then I check if input value for "#log" match text "V4 hV4 V5"
When I press button "Reload V"
Then I check if input value for "#log" match text "V4 hV4 V5 V6"
When I press button "Reload I"
Then I check if input value for "#log" match text "V4 hV4 V5 V6 hU3 I7 U7 V7"
When I press button "Add U handler"
When I press button "Reload V"
Then I check if input value for "#log" match text "V4 hV4 V5 V6 hU3 I7 U7 V7 V8"

Scenario: multiple handlers
When I fill field using "#log" with ""
When I press button "Add V handler"
When I press button "Add V handler"
When I press button "Reload V"
Then I check if input value for "#log" match text "hV6 hV6 V7"
Then I check if input value for "#log" match text "hV8 hV8 V9"

Scenario: handler for child must be called first
Given I am on "_unit-test/element-remove-observer.php"

0 comments on commit a1d0fbd

Please sign in to comment.