Since we java javascript test coverage backed upon ower PHPUnit based testing framework we hopefully gained some stability in our JS.
As multiple people discussed though, testing javascript in PHP might not be ideal.
We could use a JS testing framework like to make it possible

Advantages of testing JS in PHP

  • One testing syntax to rule them all
  • People are aware of phpunit now already

Advantages of testing JS in JS

  • JS developers who want to participate into Drupal don't have to learn PHP / learn the phpunit testing framework as they are already familiar with nightwatch
  • The JS world is much bigger than the PHP world now, so they should provide better testing frameworks for their needs

Proposed resolution

DISCUSS whether its a good idea

Remaining tasks

User interface changes

API changes

Data model changes

#6 interdiff-2869825.txt1.34 KBdawehner
#6 2869825-6.patch112.55 KBdawehner
#3 2869825-2.patch112.05 KBdawehner


dawehner created an issue. See original summary.

dawehner’s picture

Here is some start of an experiment, yes just an experiment.

It consists of a couple of pieces:

  • It provides a script to install a specific installation profile in a testing environment and it returns the DB prefix used for it
  • It installs nightwatch and configures a headless chrome
  • It uses the DB prefix to set the right cookie required to get testing running (this is not working properly yet)
dawehner’s picture

112.05 KB

Here is the current status of the patch, it is not working properly yet, see comment #2.

drpal’s picture

dawehner’s picture

dawehner’s picture

112.55 KB
1.34 KB

Note: This now actually sets up the browser in a way that the child site can be accessed.