diff options
Diffstat (limited to 'qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb')
-rw-r--r-- | qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb b/qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb index 51791c01048..3cd57f97a34 100644 --- a/qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/web_ide/web_terminal_spec.rb @@ -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 |