summaryrefslogtreecommitdiff
path: root/tests/unit/browser/test_caret.py
AgeCommit message (Collapse)Author
2022-01-04Use flake8-pytest-stylepytest-styleFlorian Bruhin
2021-02-26Qtbot methods changed to snake case,snake case check addedLembrun
2021-01-26doc: Switch URLs to httpsFlorian Bruhin
2021-01-20Bump copyright yearsFlorian Bruhin
Closes #6015
2020-11-04old qt: Remove conditional and old testsFlorian Bruhin
2020-07-31Add a test for ignoring _toggle_sel_translateFlorian Bruhin
2020-05-22caret: Fix toggling behavior with QtWebEngineFlorian Bruhin
The behavior when pressing `v` in line selection mode was different between QtWebKit and QtWebEngine: With QtWebKit, normal selection mode was entered, while with QtWebEngine, selection mode was left. Do the former with QtWebEngine as well, as that's also what vim does.
2020-05-22tests: Make sure entering caret mode is finishedFlorian Bruhin
Otherwise, the caret JS code could still be initializing while the tests start to run.
2020-05-22tests: Skip failing caret test on macOSFlorian Bruhin
See #5459
2020-05-22caret: Style improvements for line modeFlorian Bruhin
2020-05-22tests: Increase timeout for caret.html loadingFlorian Bruhin
For some odd reason, loading the file sometimes takes >5s on macOS... See https://github.com/qutebrowser/qutebrowser/issues/5390#issuecomment-629269038
2020-05-02added testssvetelna
2020-05-02Harden caret tests and always show windowFlorian Bruhin
With newer Qt versions, it looks like the caret window always needs to be shown for the selection to work correctly. However, the test silently passed when no selection was available.
2020-01-04Adjust copyrights for 2020Florian Bruhin
2019-07-06Expose view when searching on macOS/Windows with 5.13Florian Bruhin
2019-04-02Use :move-to-end-of-word to test :reverse-selectionFlorian Bruhin
On macOS, doing :move-to-end-of-line after :toggle-selection still moves the right cursor (rather than the left), causing our test to fail. Running the equivalent JS snippet on Chrome reveals the same behavior, so let's just use some other movement for the test. Fixes #4694
2019-03-31Expose webtab for caret selection tests.Jimmy
With 5.13 `window.getSelection()` (which we use to find the focused element) appears to require this expose thing. See 85f95f6f41567 for the same workaround for hint tests. https://github.com/qutebrowser/qutebrowser/issues/4592
2019-03-28Merge remote-tracking branch 'origin/pr/4513'Florian Bruhin
2019-02-22Update copyright for 2019Jay Kamat
2019-01-20Move tests from caret.feature to test_caret.pyadam
Also changed one of the tests to be a better test of reversing the selection. `tests/unit/browser/test_caret.py:TestReverse:test_reverse` reverses the selection multiple times and tests out motions several times, making sure that the selection can be reversed more than once (I had a bug where the selection was reversed only once), and the selection is updated correctly after several motions. Changes to be committed: modified: tests/end2end/features/caret.feature modified: tests/unit/browser/test_caret.py
2018-11-30Rename openurl to load_urlFlorian Bruhin
We still call the :open command openurl, but in the tab API and in TabbedBrowser it's now called load_url.
2018-10-06Avoid showing widgets in tests if unneededFlorian Bruhin
This avoids odd X errors with test_webenginetab.py, and also makes it run much faster (0.8s instead of 1.3s).
2018-09-27Fix lintFlorian Bruhin
2018-09-27Use callback.assert_called_with()Florian Bruhin
2018-09-26Use qtbot.wait_callbackFlorian Bruhin
2018-09-26Use wait argument with qtbot.assert_not_emittedFlorian Bruhin
2018-09-15Wait for follow_selected_doneFlorian Bruhin
2018-09-15Fix typoFlorian Bruhin
2018-09-15Get rid of end-of-doc-workaround in caret browsingFlorian Bruhin
In Qt < 5.10 (and also sometimes on Windows), we get extra spaces or newlines when moving to the end of the document. However, this only happens *sometimes*, and manual testing confirms that with the current workaround, we actually lose the last char in the selection. I'm not sure what's happening there, but instead of making things worse with the workaround, let's just be a bit less strict with the checking there and accept both variants... This seems like some Chromium bug we can't do much about.
2018-09-15Remove duplicate testFlorian Bruhin
2018-09-14Fix lintFlorian Bruhin
2018-09-14Run all :follow-selected tests with/without JSFlorian Bruhin
2018-09-14Fix test_follow_selected_without_a_selection on QtWebKitFlorian Bruhin
2018-09-14Revert "Revert "Make sure we wait until follow_selected is done""Florian Bruhin
This reverts commit 200c11625f4dd6fb2a36f3dcb674402918da6c79.
2018-09-14Revert "Make sure we wait until follow_selected is done"Florian Bruhin
This reverts commit bc45aa33e0ac58e8ccd54508b36dc0b463c4c3c3.
2018-09-14Fix :follow-selected testsFlorian Bruhin
2018-09-14Make sure we wait until follow_selected is doneFlorian Bruhin
2018-09-13Try getting selection multiple timesFlorian Bruhin
2018-09-13Register a qute://testdata/ scheme for unit testsFlorian Bruhin
This is more lightweight than running a webserver (probably about the same as file://), but allows us to use relative links in files.
2018-09-08Rewrite some :follow-selected tests as unit testsFlorian Bruhin
2018-09-08Fix lintFlorian Bruhin
2018-09-08Fix TestSearch caret testsFlorian Bruhin
For some reason, they need the window to be shown on a screen to work...
2018-09-08Rewrite most caret tests as unit testsFlorian Bruhin