tyler36 / ddev-cypress

Cypress E2E testing for use with DDEV
Apache License 2.0
11 stars 8 forks source link

Is it possible to clarify the benefits? #43

Open gitressa opened 1 week ago

gitressa commented 1 week ago

It says that "This recipe integrates a Cypress docker image with your DDEV project.", but I am not sure how this improves the Cypress experience ...

For example, using Debian 12 as OS, if I follow the steps from https://www.drupal.org/docs/develop/automated-testing/browser-testing-using-cypress I can execute and see the tests in a Firefox instance, run by Cypress ...

So since these simple steps give me a working Cypress instance, does this addon provide any extra functionality?

gitressa commented 1 week ago

In other words, if Cypress usually works out of the box in Linux, without jumping through any hoops, and this addon is mostly for Windows and MacOS, this could get mentioned.

If I am correct, perhaps add a sentence about it, something like this?

This recipe integrates a Cypress docker image with your DDEV project.

The main aim is providing better X11 display support for MacOS and Windows users, since Cypress usually just works in Linux. <<<< Add this?

tyler36 commented 1 week ago

The main benefit, for me at least, is the intergrated browsers. This is the reason it uses the larger image that includes Chrome and Firefox out of the box; no need to configure or setup.

This makes it much easier to debug issue because you have a known static state regardless of local OS or cloud CI/CS development.

Installing via NPM/yarn works well, but it assumes you

tyler36 commented 1 week ago

The main aim is providing better X11 display support for MacOS and Windows users, since Cypress usually just works in Linux.

I remember have some issues getting it working a few years ago in WSL; as I was unfamiliar with Linux and its CLI. Not sure if thats still an issue.

gitressa commented 1 week ago

Thanks for a fast reply, perhaps something like this could be added to clarify the potential benefits and use cases?

This recipe integrates a Cypress docker image with your DDEV project.

The main benefit is integration of Chrome and Firefox browsers out of the box, providing a known static state regardless of local OS or cloud CI/CS development. It also provides X11 display support for MacOS and Windows users, whereas this usually just works in Linux.

Installing via NPM/Yarn works well, but it assumes you:

  • Have already installed Node.js
  • Assumes you have correctly installed browsers (i.e. Firefox or Chromium) available

Browser testing using Cypress sets up Cypress for Drupal manually. For Linux users this could be easier, since X11 and Firefox are usually already present.

gitressa commented 1 week ago

I created an MR, as a possible starting point for discussion.