Skip to content

Remove unneeded Capybara::Session.new

Lin Jen-Shin requested to merge remove-unneeded-manual-capy-sessions into master

What does this MR do and why?

Remove unneeded Capybara::Session.new

When we use using_session, Capybara will already handle the session for us, and we don't need to manually create the sessions.

Beside, it's the wrong way to use it. That's not how we should use the sessions.

Ideally, we should use a fixed number of sessions. The default session is called default and it's reused for all specs. The other sessions should be reused for all specs as well, thus they should use the same names.

We'll want to have a standard way to use the other sessions. Here we're just removing the bogus usages.

This is a follow up from investigating gitlab-org/quality/engineering-productivity/master-broken-incidents#6673 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Lin Jen-Shin

Merge request reports