drupal-code-generator icon indicating copy to clipboard operation
drupal-code-generator copied to clipboard

Feature request: enable JavaScript testing

Open chx opened this issue 5 months ago • 2 comments

I have no idea how to get headless chrome running in github actions (to be fair it caused endless headaches locally as well). PR to get it running would be welcome. It should restore the following files:

  1. tests/sut/bar/tests/src/FunctionalJavascript/JavaScriptTest.php
  2. tests/sut/qux/tests/src/FunctionalJavascript/FieldBase.php
  3. tests/sut/qux/tests/src/FunctionalJavascript/FieldFormatterTest.php
  4. tests/sut/qux/tests/src/FunctionalJavascript/FieldWidgetTest.php

And revert 53d7c3aac4 which commented out the generated test in xerox.

The previous maintainer said back in November phpunit just skipped these but it surely doesn't do that now.

chx avatar Jun 01 '25 00:06 chx

probably it needs to switch to w3c driver https://www.drupal.org/node/3460567

andypost avatar Jun 01 '25 10:06 andypost

There's a lot more than that, it probably needs a selenium container -- without it I got a connection error -- I tried adding it and then I got a no capabilities available error message and that's where I gave up. Probably chromedriver is missing etc. Getting these tests running is certainly not the best use of my time, there's a lot to do.

chx avatar Jun 01 '25 14:06 chx

I started on this again the branch webdrivertest but got nowhere.

chx avatar Jun 03 '25 15:06 chx