summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2024-03-27 19:49:09 +0100
committerFlorian Bruhin <me@the-compiler.org>2024-03-27 19:49:09 +0100
commit713a4e5ec27e9dd5e131cead6adc0438a9b3971f (patch)
tree873b4b8ad3c073987b0fa50f33b709bf137661c8
parent7a969a2d54633f334f7ba2002515471eec472c59 (diff)
downloadqutebrowser-flaky-caret-windows.tar.gz
qutebrowser-flaky-caret-windows.zip
Fix caret tests on Qt 6 and Windowsflaky-caret-windows
-rw-r--r--tests/end2end/features/caret.feature4
-rw-r--r--tests/unit/browser/test_caret.py10
2 files changed, 11 insertions, 3 deletions
diff --git a/tests/end2end/features/caret.feature b/tests/end2end/features/caret.feature
index 1302a1e6d..d6e65440c 100644
--- a/tests/end2end/features/caret.feature
+++ b/tests/end2end/features/caret.feature
@@ -34,11 +34,11 @@ Feature: Caret mode
Scenario: :yank selection with --keep
When I run :selection-toggle
- And I run :move-to-end-of-word
+ And I run :move-to-next-word
And I run :yank selection --keep
And I run :move-to-end-of-word
And I run :yank selection --keep
- Then the message "3 chars yanked to clipboard" should be shown
+ Then the message "4 chars yanked to clipboard" should be shown
And the message "7 chars yanked to clipboard" should be shown
And the clipboard should contain "one two"
diff --git a/tests/unit/browser/test_caret.py b/tests/unit/browser/test_caret.py
index ba1da4145..d51cc69ff 100644
--- a/tests/unit/browser/test_caret.py
+++ b/tests/unit/browser/test_caret.py
@@ -9,7 +9,8 @@ import textwrap
import pytest
from qutebrowser.qt.core import QUrl
-from qutebrowser.utils import usertypes
+from qutebrowser.qt import machinery
+from qutebrowser.utils import utils, usertypes
from qutebrowser.browser import browsertab
@@ -241,6 +242,13 @@ class TestWord:
caret.move_to_end_of_word()
selection.check("one")
+ @pytest.mark.xfail(
+ machinery.IS_QT6 and utils.is_windows,
+ reason=(
+ "move-to-end-of-word is broken with Qt 6 and Windows: "
+ "https://github.com/qutebrowser/qutebrowser/issues/8146"
+ )
+ )
def test_moving_to_end_and_selecting_a_word(self, caret, selection):
caret.move_to_end_of_word()
selection.toggle()