#2942900-13: Convert JavascriptTestBase Tests to use DrupalSelenium2Driver point 3 shows us that the Current implementation of the Drupal2Selenium driver isn't capable of handling file uploads.
I've researched this, and it appears to be a bug in the behat/mink-selenium2-driver library that we're relying on.
https://github.com/minkphp/MinkSelenium2Driver/issues/187
https://github.com/minkphp/MinkSelenium2Driver/pull/252
It appears as though pfrenssen ran into this independently, and fixed it, however there has not yet been a new release of the driver since it was fixed.
https://github.com/minkphp/MinkSelenium2Driver/issues/269
Upgrading to behat/mink-selenium2-driver:1.3.x-dev on my local dev fixes the file uploading issues for the following six tests:
Drupal\Tests\system\FunctionalJavascript\ThemeFormSettingsTest
Drupal\Tests\file\FunctionalJavascript\MaximumFileSizeExceededUploadTest
Drupal\Tests\image\FunctionalJavascript\QuickEditImageTest
Drupal\Tests\media\FunctionalJavascript\MediaSourceAudioVideoTest
Drupal\Tests\media\FunctionalJavascript\MediaSourceFileTest
Drupal\Tests\media\FunctionalJavascript\MediaSourceImageTest
Im not quite sure the process we go through to do composer upgrades of packages, and whether or not we're all that keen on having an upstream dev version (that isnt passing its own tests), or if we'd rather fork and apply pfrenssen's pull request to 1.3.1.
Comment | File | Size | Author |
---|---|---|---|
#4 | 2944291-4.patch | 2.65 KB | jibran |
Comments
Comment #2
MixologicComment #3
jibranWe already have
"behat/mink": "1.7.x-dev",
in dev section so I don't see any reason to not update this too.Comment #4
jibranHere is the patch.
Comment #5
MixologicFunny thing here is that this is sortof chicken and egg. This patch upgrades the mink library that only one test currently relies on. Should we add this change back in on the parent issue to demonstrate that it works (it does, for me, in local testing, but works on my machine isnt really a high enough bar)?
It would mean that three of the four media tests that required manual override of the Phantomjs lib wouldn't be needed, but also means the patch becomes slightly more complex to review and understand...
Comment #6
jibranYou should post a combined patch to the #2942900: Convert JavascriptTestBase Tests to use DrupalSelenium2Driver. Once we'll have those test passing we'll postpone #2942900 on this one and get it fixed.
Comment #7
MixologicThanks bajillions @jibran.
Given that the combined patch shows that we've not exposed any other bugs with the upgrade(https://www.drupal.org/project/drupal/issues/2942900#comment-12479928) , this ought to go in first.
Comment #8
alexpottCommitted and pushed 3b0be18a1a to 8.6.x and 2a5cdaec84 to 8.5.x. Thanks!
Backported to 8.5.x as a test-only change.
Comment #11
Mixologic👏👏👏
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commented🌟Cool step! Let's take one more step in #2947517: Selenium driver: API to get remote file paths