minkphp / driver-testsuite

Functional testsuite for Mink drivers
MIT License
8 stars 28 forks source link

Fix tests failing from format ambiguities #68

Closed uuf6429 closed 1 year ago

uuf6429 commented 1 year ago

There are 3 fixes:

  1. use https url - just a nice to have to avoid IDE complaints on using unsafe protocol
  2. use 14:12 instead of 12:12; without this change the browser doesn't know if it's AM or PM, causing the form to be invalid and not submittable. Using 14, causes the browser to correctly guess we're interested in PM.
  3. filling the date was the trickiest problem, since as of now, there's no sane way to force a specific date field format. The fix is (ironically) to use the ambiguity behind 1111-11-11 which gives us a valid date no matter what. 🤷
aik099 commented 1 year ago

@uuf6429 , Looking at the proposed fixes I'm assuming, that you've seen the testHtml5Types test failing somewhere.

Two questions:

  1. where you've seen the testHtml5Types test fail?
  2. why doesn't it fail for any of the drivers?

P.S. PR description is so good, that I had no need to view the code. I did it though anyway.

uuf6429 commented 1 year ago

@uuf6429 , Looking at the proposed fixes I'm assuming, that you've seen the testHtml5Types test failing somewhere.

Two questions:

  1. where you've seen the testHtml5Types test fail?
  2. why doesn't it fail for any of the drivers?

P.S. PR description is so good, that I had no need to view the code. I did it though anyway.

  1. I'm writing my own driver for php-webdriver/webdriver, and I'm running this test suite against each major selenium version (2, 3 and 4), for chrome and firefox, using the official selenium-standalone docker images. I can dig into exactly where it was failing, but I assume that a difference in the docker image locale might have caused the failures (chrome thinking it is in en-US will behave differently compared to de-DE or so). If you really want to know exactly where, I can check to be sure.
  2. I guess because the existing drivers are not testing against many selenium versions? The github action for MinkSelenium2Driver is only checking firefox on selenium 2.53.1, for example.
stof commented 1 year ago

@uuf6429 having a driver for php-webdriver/webdriver is something that we would have like to have since a long time (see the discussions in https://github.com/minkphp/MinkSelenium2Driver/issues/293 and https://github.com/minkphp/MinkSelenium2Driver/issues/298). But we never did the work on it. What do you think about making your driver an official one in the Mink organization ?

uuf6429 commented 1 year ago

@stof sure, fine by me. At the moment I'm fighting with the test setup in GitHub. I'll let you guys know when it's in a stable position, then I can hand over ownership.