From d4ea1df2325c932343ff8c3f278512065fa057fb Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 25 Mar 2018 19:56:48 +0200 Subject: [PATCH] Improve window_open.html tests --- tests/end2end/data/javascript/window_open.html | 6 ++++-- tests/end2end/features/javascript.feature | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/end2end/data/javascript/window_open.html b/tests/end2end/data/javascript/window_open.html index 774acafc6..f5eafa0bc 100644 --- a/tests/end2end/data/javascript/window_open.html +++ b/tests/end2end/data/javascript/window_open.html @@ -3,10 +3,10 @@ diff --git a/tests/end2end/features/javascript.feature b/tests/end2end/features/javascript.feature index fb48a5932..8f715397f 100644 --- a/tests/end2end/features/javascript.feature +++ b/tests/end2end/features/javascript.feature @@ -15,7 +15,10 @@ Feature: Javascript stuff And I wait for "Changing title for idx 1 to 'about:blank'" in the log And I run :tab-focus 1 And I run :click-element id close-normal + And I wait for "[*] window closed" in the log Then "Focus object changed: *" should be logged + And the following tabs should be open: + - data/javascript/window_open.html (active) @qtwebkit_skip Scenario: Opening/closing a modal window via JS @@ -25,8 +28,11 @@ Feature: Javascript stuff And I wait for "Changing title for idx 1 to 'about:blank'" in the log And I run :tab-focus 1 And I run :click-element id close-normal + And I wait for "[*] window closed" in the log Then "Focus object changed: *" should be logged And "Web*Dialog requested, but we don't support that!" should be logged + And the following tabs should be open: + - data/javascript/window_open.html (active) # https://github.com/qutebrowser/qutebrowser/issues/906 @@ -39,6 +45,7 @@ Feature: Javascript stuff And I wait for "Changing title for idx 2 to 'about:blank'" in the log And I run :tab-focus 2 And I run :click-element id close-twice + And I wait for "[*] window closed" in the log Then "Requested to close * which does not exist!" should be logged @qtwebkit_skip @flaky @@ -51,6 +58,7 @@ Feature: Javascript stuff And I run :buffer window_open.html And I run :click-element id close-twice And I wait for "Focus object changed: *" in the log + And I wait for "[*] window closed" in the log Then no crash should happen @flaky