diff options
author | Florian Bruhin <me@the-compiler.org> | 2018-09-14 20:23:56 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2018-09-14 21:57:37 +0200 |
commit | 8d066690e67582348e0f1bf5900e40a5964bd185 (patch) | |
tree | 0270453ec8661be7cc2768a19995a5157d08d240 /tests/unit/browser/test_caret.py | |
parent | bc45aa33e0ac58e8ccd54508b36dc0b463c4c3c3 (diff) | |
download | qutebrowser-8d066690e67582348e0f1bf5900e40a5964bd185.tar.gz qutebrowser-8d066690e67582348e0f1bf5900e40a5964bd185.zip |
Fix :follow-selected tests
Diffstat (limited to 'tests/unit/browser/test_caret.py')
-rw-r--r-- | tests/unit/browser/test_caret.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/unit/browser/test_caret.py b/tests/unit/browser/test_caret.py index 273fd6881..70677361c 100644 --- a/tests/unit/browser/test_caret.py +++ b/tests/unit/browser/test_caret.py @@ -331,16 +331,24 @@ class TestSearch: class TestFollowSelected: - def test_follow_selected_without_a_selection(self, qtbot, caret, selection): + LOAD_STARTED_DELAY = 50 + + def test_follow_selected_without_a_selection(self, qtbot, caret, selection, web_tab, + mode_manager): + mode_manager.leave(usertypes.KeyMode.caret) with qtbot.wait_signal(caret.follow_selected_done): - caret.follow_selected() + with qtbot.assert_not_emitted(web_tab.load_started): + caret.follow_selected() + qtbot.wait(self.LOAD_STARTED_DELAY) - def test_follow_selected_with_text(self, qtbot, caret, selection): + def test_follow_selected_with_text(self, qtbot, caret, selection, web_tab): caret.move_to_next_word() selection.toggle() caret.move_to_end_of_word() with qtbot.wait_signal(caret.follow_selected_done): - caret.follow_selected() + with qtbot.assert_not_emitted(web_tab.load_started): + 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, |