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:
- Once you select the feature to be activated, the submit button changes from
Save changes
toTest settings and save changes
. - 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 selectSave 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
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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 🤖