Commit f2c7d4d0 authored by Ramya Authappan's avatar Ramya Authappan

Merge branch 'qa-web-terminal-spec-catch-connection-failures' into 'master'

Add extra checks to web_terminal_spec

See merge request gitlab-org/gitlab!76277
parents 8a5c3f65 d45527c6
......@@ -65,6 +65,7 @@ module QA
# a) The terminal JS package has loaded, and
# b) It's not stuck in a "Loading/Starting" state, and
# c) There's no alert stating there was a problem
# d) There are no JS console errors
#
# The terminal itself is a third-party package so we assume it is
# adequately tested elsewhere.
......@@ -78,6 +79,17 @@ module QA
expect(edit).to have_finished_loading
expect(edit).to have_terminal_screen
end
# It takes a few seconds for console errors to appear
sleep 3
errors = page.driver.browser.logs.get(:browser)
.select { |e| e.level == "SEVERE" }
.to_a
if errors.present?
raise("Console error(s):\n#{errors.join("\n\n")}")
end
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment