Skip to content

Fail E2E tests early if template not found via API

Mark Lapierre requested to merge qa-ml-fail-early-if-template-not-found into master

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

Edited by Mark Lapierre

Merge request reports