From 5ea8e766f57fe5a368334b53823764e1a93c024c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 14 Sep 2018 22:49:18 +0200 Subject: [PATCH] Run all :follow-selected tests with/without JS --- tests/unit/browser/test_caret.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/unit/browser/test_caret.py b/tests/unit/browser/test_caret.py index 7b7db595f..63699976c 100644 --- a/tests/unit/browser/test_caret.py +++ b/tests/unit/browser/test_caret.py @@ -333,6 +333,10 @@ class TestFollowSelected: LOAD_STARTED_DELAY = 50 + @pytest.fixture(params=[True, False], autouse=True) + def toggle_js(self, request, config_stub): + config_stub.val.content.javascript.enabled = request.param + def test_follow_selected_without_a_selection(self, qtbot, caret, selection, web_tab, mode_manager): caret.move_to_next_word() # Move cursor away from the link @@ -351,10 +355,8 @@ class TestFollowSelected: caret.follow_selected() qtbot.wait(self.LOAD_STARTED_DELAY) - @pytest.mark.parametrize('with_js', [True, False]) def test_follow_selected_with_link(self, caret, selection, config_stub, - qtbot, web_tab, with_js): - config_stub.val.content.javascript.enabled = with_js + qtbot, web_tab): selection.toggle() caret.move_to_end_of_word() with qtbot.wait_signal(web_tab.load_finished):