Skip to content

RESTBasicAuth is now required for Cypress tests

Some Cypress tests need RESTBasicAuth, but it's disabled by default.

My plan was to turn it on globally (ie. set before any tests, and reset to its original value after)

But we cannot right now:

  • Update in DB could work, but its cached
  • Call the svc script won't work, as we are not logged in yet (and this script require the session cookie)

So, we had some solutions:

  • have a "flush cache" route (smells the rabbit hole)
  • login to get the cookie, set the syspref via the svc script, logout (ugly, and will slower the cypress tests)
  • require the pref on for cypress tests

We decided to opt now for the third option, turn it on from misc4dev so that the Cypress tests will not fail for CI or devs.

Edited by joubu