Skip to content

Log out after the group template test

Mark Lapierre requested to merge ml-qa-log-out-after-group-template-test into master

What does this MR do?

All QA tests expect to be able to log in at the start of the test.

That's not possible if a test leaves the browser logged in when it finishes. Normally this isn't a problem because Capybara resets the session after each test. But it does that in an after block, so when a test logs in in an after(:all) block, the browser returns to a logged in state after Capybara has logged it out. And then the next test will fail.

E.g.: #34736 (closed)

The fix is to log out once we're done in the after(:all) block.

There's another MR to prevent this from happening in the future: !18978 (merged)

This also updates the test to use Resource::Repository::Commit to commit multiple files in one API call instead of Resource::File, which required four API calls (because there are four files).

Closes #34736 (closed)

Does this MR meet the acceptance criteria?

Conformity

Merge request reports