Change tests to add members using API
What does this MR do?
Due to this failure #212185 (closed) I've changed the way some of the effected tests add members to groups or projects so that they use the API which is faster and avoids the error above without impacting the integrity of the test.
The two audit listed in the failure issue above were not fixed because adding users via the API did not seem to trigger an audit log, which may be a bug and I will investigate further. Another test, not modified, is an orchestrated test involving email, which I did not change because I haven't yet figured out how to run orchestrated tests on my local (yes I'm aware of Sanad's video series on running orchestrated tests, I intend to watch them soon). The last test I did not modify was for adding the project member using the UI, thus, is not suitable to use the API when explicitly testing the UI feature.
Screenshots
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