minkphp / webdriver-classic-driver

Mink driver for the W3C WebDriver Classic protocol
MIT License
3 stars 5 forks source link

Add driver factory and extension #16

Closed uuf6429 closed 8 months ago

uuf6429 commented 8 months ago

Closes #15.

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 0% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 80.78%. Comparing base (ce10226) to head (6d512e7). Report is 2 commits behind head on main.

Files Patch % Lines
src/WebdriverClassicExtension.php 0.00% 8 Missing :warning:
src/WebdriverClassicFactory.php 0.00% 8 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #16 +/- ## ============================================ - Coverage 83.54% 80.78% -2.77% - Complexity 191 198 +7 ============================================ Files 1 3 +2 Lines 468 484 +16 ============================================ Hits 391 391 - Misses 77 93 +16 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

aik099 commented 8 months ago

@uuf6429 , Adding the behat/mink-extension as a driver dependency assumes, that the only way to use the driver is through the Mink+Behat combo. This is incorrect.

Mink moved away from the Behat GitHub organization into its own minkphp GitHub organization a long time ago. I guess the reason for that was the fact, that Mink can be used on its own and not only through the Behat. The existence of these projects proves it:

That might indirectly answer your question in https://github.com/minkphp/webdriver-classic-driver/issues/15#issuecomment-1963472897 as well.

uuf6429 commented 8 months ago

The Behat needs Mink, not the other way around. In this point of view the PR needs to be made into the https://github.com/FriendsOfBehat/MinkExtension as we've discussed in the associated issue.

That feels like yet another problem of the behat/mink-extension package. As I said earlier, the factories shouldn't be behat(/mink-extension)-specific IMO.

What maybe makes sense in this case is to remove behat/mink-extension from require, leave the FriendsOfBehat one in require-dev and also add it to suggests. What do you think?

stof commented 8 months ago

This does not belong here. This should go inside the MinkExtension repository (or in a separate extension, but as this is an official Mink driver, it can go in the main MinkExtension).

Mink itself should not depend on Behat extensions.