-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] Behat window size issue #1538
Conversation
tests-behat/bootstrap/Context.php
Outdated
@@ -275,8 +274,7 @@ public function iPressModalButton($arg) | |||
*/ | |||
public function modalIsOpenWithText($arg1) | |||
{ | |||
// get modal | |||
$modal = $this->getSession()->getPage()->find('css', '.modal.transition.visible.active.front'); | |||
$modal = $this->waitForNodeElement('.modal.transition.visible.active.front'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for what - with jqueryWait, we wait for AJAX + some enough time in which all animations should finish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because when content has finished loading inside the modal, the modal will resize according to new content.
If you try to get the modal window while it is reloading then the test fails because the modal return null.
You can look at the commit history to see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
Now how to handle it - jquery wait should do that FOR EVERYTHING :)
do you interact with Modal as the "1st operation in Behat step"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see anything that will let us know that the modal window is resizing and has finish resizing... Do you?
That is why I put a loop there. The other solution will be to intentionally wait for a few ms but I think the loop is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jquery wait waits some extra time for exactly these situations :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I guess it does not wait long enough... I can try to increase time there but it will increase for every step, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you interact with Modal as the "1st operation in Behat step"
if yes, then there is probably some other issue, as the additional delay is already quite long. And I tested it very extensively - there is probably other issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an issue and this is how to fix it...
* refactor - Calendar input Use flatPickr js. * add localization * allow time format changes and late options changed * refactor init * switch to flatpickr vue component - multiine now use flatpickr - queybuilder now use flatpickr * refactor UI persistence * fix getApp * move Date props to format array * fix * move type class into array container * refactor type * update comment / cs fixer * fixes * add sample * cs fixe * improve example * more sample * fix label * cs fix * add behat test * cs fix * fixes * update demo * fixes * fix getTheirModel to createTheirModel * add flatpickr after merging develop * update cdn cloudflare * revert to previous ui_persistence * remove old comments * fix demo date input * refactor query builder props * cs fix * use Calendar translate format * base props on component instead of type * remove static function * revert options * allow flatpickr option * change function name and add comments * cs fix * Increase memory theshold for burn testing * enhancement - query builder date, datetime or time always output same format but still display according to ui persistence * cs fix * support for condition value * use flatpickr altFormat * incl build * set html for behat test * behat test for scopebuilder * behat fix * fix typo * more typo * add boolean rule * behat check for word match * rename demo to Scope Builder * clean up * remove comments * update comments * improve function var * add check for input value in scopebuilder test * revert preg_replace * dump word * dump exprected with no dump * test * test no input * add container not found exeption * increase headless window size * update preg_replace pattern * improve input error message * revert to operator symbol * refactor mulitline flatpickr option * fixes * remve pregreplace for word comparaison * no ui exception in Behat * workaround for window-size * Update behat.yml.dist Co-authored-by: Michael Voříšek <[email protected]> * update js release * new arrow function usage * remove workaround * fix behat - fix until #1538 is resolved * add temporary fix until #1538 is resolve * cs fix * revert headless with bigger window size Co-authored-by: Michael Voříšek <[email protected]>
@ibelar the issue is that Investigating more to identify the issue. getText getter: getHtml getter: |
closing because minkphp/MinkSelenium2Driver#327 might be interesing to replace the limited Mink impl. from our Context class |
rebased once #1524 is merged
related with minkphp/MinkSelenium2Driver#327 , finish once merged & released
original discussion:
see: https://github.com/Behat/MinkExtension/blob/master/doc/index.rst
Fix issue with selenium/standalone-chrome image when test are run using arguments: --headless and --window-size together and window-size value is set using low value.
Most of the time, an element is not found or the element text value returns null, although the element contains the text.
see #1469
Note: --window-size option value must make sense since error like 'element click intercept' or 'element not interactable' will occur on certains tests.