Fail E2E tests early if template not found via API
What does this MR do?
Some tests use QA::Runtime::Fixtures.fetch_template_from_api
to fetch templates, but if the template isn't found the tests would leave the UI in a state that resulted in an alert popping up when Capybara tried to leave the page.
This change raises an exception if a template can't be found, causing the test to fail before it gets to the point where an alert will appear.
I'm confident the root cause is the missing templates, and the changes in this MR allow the other tests to run even if this one fails, so I'll leave the test in quarantine so we can at least merge this fix for the tests, and wait for https://gitlab.com/gitlab-org/gitlab-ce/issues/66315 to be dealt with, after which we can remove the test from quarantine.
See https://gitlab.com/gitlab-org/quality/nightly/issues/127 (this MR doesn't close the issue because the license templates are still missing)
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios.
- [-] Documentation created/updated or follow-up review issue created
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content