Closed aik099 closed 8 months ago
LGTM
I don't get why this change is needed, to be honest. My first guess is that Selenium2Driver does not "share" the fixtures with the browser container - here's how it's done in the classic driver, which works hand-in-hand with the config here. (Side note: why was it working before for Selenium2?)
Additionally, now that I think about it, we should also have a test checking that the correct form (file) data has been POSTed (apparently this test is only checking change events?).
_PS: at the very least, I would avoid having vendor/github-specific code in some random test class. It would make more sense to define an ISCI / isCi() variable/config method.
I don't get why this change is needed, to be honest. My first guess is that Selenium2Driver does not "share" the fixtures with the browser container - here's how it's done in the classic driver, which works hand-in-hand with the config here.
@uuf6429 , My second thought today, after submitting this PR yesterday was how file upload tests were passing for you with no changes on the WebDriver code side. Looking through the build config of the https://github.com/minkphp/webdriver-classic-driver I've also stumbled upon the mapping and created another PR (see https://github.com/minkphp/MinkSelenium2Driver/pull/385), where I'm adding mapping + overriding the mapRemoteFilePath
as you did.
(Side note: why was it working before for Selenium2?)
@uuf6429 , it was working, as @mvorisek had discovered, because Selenium 2 either wasn't checking that the to-be-uploaded file exists on disk OR was allowing relative file paths (with ../../
as we've used to have). I don't recall which of 2 was actually happening or both.
Additionally, now that I think about it, we should also have a test checking that the correct form (file) data has been POSTed (apparently this test is only checking change events?).
Agreed. Created https://github.com/minkphp/driver-testsuite/issues/89 . If you'd like you can create a PR.
_PS: at the very least, I would avoid having vendor/github-specific code in some random test class. It would make more sense to define an ISCI / isCi() variable/config method.
Agreed.
Fixes this error from the https://github.com/minkphp/MinkSelenium2Driver/pull/383:
Inspired by the @mvorisek work on the https://github.com/minkphp/driver-testsuite/pull/60.