Skip to content

Update project services feature specs to use JS

What does this MR do?

Split out from !27778 (merged) while working on #199882 (closed)

Some feature specs are run without JS, which isn't reflective of what is happening on the frontend. In particular:

  1. Once you select the feature to be activated, the submit button changes from Save changes to Test settings and save changes.
  2. After you fill in the form and click the button, an AJAX request will try to test the service.
    • If the test is successful, the service will be activated.
    • If the test is not successful, the user is given an error with details and an option to Save anyway. User can select Save anyway and the service will be saved.

This MR fixes the above feature specs:

  • Specs now need to execute with the :js option to test more realistically what the code is doing.
  • All actual testing of services has been stubbed to reduce complexity.
  • With !23009 (merged), new services are active by default. Thus, we do not need to manually activate them.
  • Extract common spec functionality to a shared context to DRY up spec code.

Screenshots

N.A.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports