We use Cypress to test the UI of all OS2Loop modules and we utilize Cypress for Drupal to make it easy to create and run UI tests.
To add Cypress tests to a module, os2loop_page, say, add a sub-module called
os2loop_page_tests_cypress under the os2loop_page module:
web/profiles/custom/os2loop/modules/os2loop_page
└── modules
├── os2loop_page_tests
└── os2loop_page_tests_cypresscd web
php core/scripts/run-tests.sh --sqlite /tmp/test.sqlite os2loop_testsvendor/bin/phpunit --configuration web/coreTo run tests with the symfony binary we need a to patch run-tests.sh (cf. https://www.drupal.org/project/drupal/issues/2748883#comment-12102000):
cd web
curl https://www.drupal.org/files/issues/use_the_php_binary-2748883-32.patch | patch --strip=1Then run tests with
symfony php core/scripts/run-tests.sh --php 'symfony php' --sqlite /tmp/test.sqlite os2loop_tests