Commit Graph

291 Commits

Author SHA1 Message Date
Ryan Roden-Corrent
e684cfa03f Trivial fixes for marks based on code review.
- Fix a docstring copy-paste
- Add own name/copyright date to new file
- Simplify a bdd expression (no need for regex)
- Scroll to a pixel position in a single operation
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
540f4af225 Set the ' mark after following a link.
This moves mark storage from CommandDispatcher to TabbedBrowser, so it can also
be accessed by the HintManager.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
dc246772e7 Add integration tests for set-mark and jump-mark. 2016-04-17 21:04:08 -04:00
Florian Bruhin
6e7aefca00 Add a xfail test for #797 2016-04-10 20:30:26 +02:00
Johannes Martinsson
570d8b4abe Make tab-focus count from end with negative index
This makes it possible to jump to the very last tab, as opposed to the
last focused tab, by using -1 as the index. Generally negative indexes
are counted from the end.

Solves issue #1166
2016-04-09 03:40:36 +02:00
Florian Bruhin
642dc46ba9 flake8: Add hacking 2016-04-08 07:35:53 +02:00
Florian Bruhin
7141941ece Fix lint 2016-04-06 07:17:13 +02:00
Florian Bruhin
f0b66130d6 Merge branch 'rcorre-edit-url' 2016-04-06 06:52:43 +02:00
Florian Bruhin
86dec02fe8 bdd: Add tests for :edit-url 2016-04-06 06:47:19 +02:00
Florian Bruhin
537d017ec2 @Kingdread is faster than AppVeyor 2016-04-05 14:11:51 +02:00
Florian Bruhin
0abd16f6e5 tests: Use repr to wait for download question
The tests failed on Windows because a double-slash was printed in the
logs, but the tests expected a single one.
2016-04-05 14:09:25 +02:00
Florian Bruhin
860853f66f Fix lint 2016-04-05 12:40:46 +02:00
Florian Bruhin
ebee06a9c4 bdd: Add tests for download-path-suggestion 2016-04-05 11:43:35 +02:00
Florian Bruhin
6631c6456c Merge branch 'session-tests' 2016-04-01 06:15:52 +02:00
Florian Bruhin
aad2407de1 Merge branch 'force-current-tab' of https://github.com/paretje/qutebrowser into paretje-force-current-tab 2016-04-01 06:13:08 +02:00
Florian Bruhin
d30093b877 Skip "Focusing download widget via Tab" on old Qt
Qt < 5.3.1 (used on Travis with Ubuntu Trusty) has a bug with its
javascript prompt implementation, so we can't run that test there.
2016-03-31 21:12:13 +02:00
Florian Bruhin
27b31b7ded Avoid DownloadView being focused when pressing tab
The previous fix didn't work in situations where the web view was
actually focused, but had no focused element (like about:blank).

The new fix always works, and even is a lot simpler!

Fixes #504.
2016-03-31 19:45:36 +02:00
Florian Bruhin
123fd18af5 Fix crash when removing download in closed window
When a download is finished with `removed-finished-download` set to a
delay, it's removed via a singleshot QTimer.

However, when the window was closed in the meantime, the slot still was
executed by Qt, even though the DownloadManager was already deleted.

Fixes #1242
2016-03-31 19:09:43 +02:00
Jimmy
97ab6db655 Adds tests for buffer command.
The buffer_troubling_args tests may look a little un-intuitive but that is
because they are testing the edge cases for the current behaviour. If these
edge cases are encountered during normal usage you are doing something wrong.
2016-03-31 14:00:36 +13:00
Kevin Velghe
0432ba68c6 Add hints integration test 2016-03-30 23:53:18 +02:00
Florian Bruhin
a6a2210ce8 Add tests for #879 2016-03-30 22:16:36 +02:00
Kevin Velghe
f4f926cdca Add integration tests for current target hints 2016-03-30 19:49:25 +02:00
Philipp Hansch
e0e8bc805b Remove unneeded argument
Instead, figure out the data directory from the helpers directory.
2016-03-29 19:52:46 +02:00
Philipp Hansch
5ae0b0cf87 Ignore test on Windows
The userscript is a bash script and there is no bash on windows.
One solution could be to use a python userscript, but there may be
other issues (file associations), too.
2016-03-29 14:17:47 +02:00
Philipp Hansch
8a619ea84c Prevent slashes from being stripped on Windows 2016-03-29 13:25:04 +02:00
Philipp Hansch
b1ecdf2924 Try to fix path issue on windows 2016-03-29 12:11:01 +02:00
Philipp Hansch
c016c77da4 Try to fix Windows path issue with new custom step
On windows, using '/' in pathnames won't work, so it's impossible to use
to describe a path in a feature spec. The solution is to move the path
logic out of the feature spec and hand it over to `os.path.join` in a
new custom step for userscripts.
2016-03-29 01:37:40 +02:00
Philipp Hansch
e9ae2156d3 Comply with flake8 2016-03-29 00:08:14 +02:00
Philipp Hansch
449adc2dc1 Try not to confuse syntax highlighting with quotes 2016-03-28 23:53:26 +02:00
Philipp Hansch
5811a25299 Add a datapath replacement for spawning userscripts
This adds a `(datapath)` replacement for feature tests.

`(datapath)` will expand to the absolute path to the integration data
directory.
2016-03-28 23:48:37 +02:00
Philipp Hansch
0083538491 Add basic test for spawning userscripts 2016-03-25 18:21:38 +01:00
Philipp Hansch
69da5d7545 Add BDD tests for spawn command
Issue-Link: https://github.com/The-Compiler/qutebrowser/issues/999
2016-03-25 18:19:35 +01:00
Philipp Hansch
a0e32753a5 Forgot a possible race condition 2016-03-24 12:20:08 +01:00
Philipp Hansch
624aa9b41d Try to fix possible race conditions 2016-03-24 11:40:10 +01:00
Philipp Hansch
7e55eee1b9 Set background-tabs to false for rest of the tests
Because it is set to true in a previous test and it is better to avoid
shared state in tests. Especially, if we want to randomize tests later
on.
2016-03-24 10:20:21 +01:00
Philipp Hansch
38bda67adc Add background-tabs and new-tab-position tests
Using hints to select and open the link.
Not sure if there are better ways.

Issue-Link: https://github.com/The-Compiler/qutebrowser/issues/999
2016-03-24 10:09:19 +01:00
Florian Bruhin
99fadacda6 Merge branch 'multi_url_heuristic' of https://github.com/hcraT/qutebrowser into hcraT-multi_url_heuristic 2016-03-17 21:28:40 +01:00
Florian Bruhin
41b6f68fd7 bdd: Add some more tests for downloads 2016-03-14 19:06:42 +01:00
Florian Bruhin
06190a0488 bdd: Do better cleanup/separation for downloads 2016-03-14 19:06:16 +01:00
Tarcisio Fedrizzi
9286fadeee Adds wait to paste multiline text test 2016-02-29 00:39:37 +01:00
Tarcisio Fedrizzi
a9fdf09a04 Adds test of the heuristic 2016-02-28 23:44:26 +01:00
Florian Bruhin
5395e0f6e2 tests: Use a fresh instance as a workaround
Waiting seems like a perfect recipe for another flaky test, so let's better be
safe.
2016-02-28 15:26:18 +01:00
Florian Bruhin
c156f53eba Merge branch 'data-link-fix' of https://github.com/Kingdread/qutebrowser into Kingdread-data-link-fix 2016-02-27 03:01:19 +01:00
Daniel Schadt
a382b366bc tests: increase wait time
Otherwise the test might still fail on some systems
2016-02-22 21:46:54 +01:00
Daniel Schadt
a84c8ac247 tests: add workaround for QPainter bug
As suggested in the github discussion.
2016-02-22 17:39:34 +01:00
Florian Bruhin
f64916b516 Only run geolocation tests on CI
Trying to get the device location while running the tests can trigger all kind
of funny effects.

Since we can't easily mock the GPS responses, we only run those on the CI where
we at least have some predictable setup.

Fixes #1297.
2016-02-21 17:24:33 +01:00
Florian Bruhin
6a077f5d5a Fix lint. 2016-02-18 21:38:23 +01:00
Florian Bruhin
9a02dc174d bdd: use quteproc.wait_for_load_finished.
Why duplicate that logic?
2016-02-18 20:46:15 +01:00
Daniel Schadt
007425cf16 downloads: fix filename for data: links
Issue #1214

Now uses a sensible filename for data: links instead of the whole base64
content. For PDF.js, it even uses the correct pdf filename.

TODO: Produces "QPainter:🔚 Painter ended with 2 saved states" while
running the tests here (Arch Linux):
CPython: 3.5.1
Qt: 5.5.1, runtime: 5.5.1
PyQt: 5.5.1
2016-02-18 16:17:35 +01:00
Florian Bruhin
5c617b861c Switch to pytest-xvfb. Fixes #1309. 2016-02-16 20:36:23 +01:00