Commit d45527c6 authored by Anastasia McDonald's avatar Anastasia McDonald Committed by Ramya Authappan

Add extra checks to web_terminal_spec

parent 0ab4fb10
......@@ -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