Commit Graph

285 Commits

Author SHA1 Message Date
Florian Bruhin
bd611b7ee4 bdd: Skip :print test.
This sometimes seem to cause the following warning:

    QPainter:🔚 Painter ended with 2 saved states
2016-01-06 18:27:14 +01:00
Florian Bruhin
275f1ede82 bdd: Add test for :undo. 2016-01-06 18:27:14 +01:00
Florian Bruhin
4bb38f1488 bdd: Handle some more corner cases in commands.py. 2016-01-06 18:27:14 +01:00
Florian Bruhin
4099a40e35 Fix lint. 2016-01-06 08:50:22 +01:00
Florian Bruhin
d2a1282c0b tests: Split up testprocess.wait_for. 2016-01-06 08:49:30 +01:00
Florian Bruhin
b0f001d3f1 Skip :print test when window can't be focused.
For some reason the window doesn't get focused on Travis. If that happens,
let's just skip the test instead of failing it.
2016-01-06 08:29:53 +01:00
Florian Bruhin
29dd6af976 tests: Optionally skip a test when waiting for log. 2016-01-06 08:29:46 +01:00
Florian Bruhin
6a97e98007 Fix lint. 2016-01-06 07:55:42 +01:00
Florian Bruhin
02e30873e1 Only test :print on Linux. 2016-01-06 07:54:54 +01:00
Florian Bruhin
fc755c104b bdd: Add test for exception with :pyeval. 2016-01-06 07:42:33 +01:00
Florian Bruhin
03ebdfd641 bdd: Add tests for :pyeval. 2016-01-06 07:15:42 +01:00
Florian Bruhin
677dcd6748 bdd: Add tests for :print. 2016-01-06 07:15:34 +01:00
Florian Bruhin
2cadac6b6e bdd: Add tests for :stop/:reload with wrong count. 2016-01-06 07:15:20 +01:00
Florian Bruhin
e2994e9375 bdd: Add "the page should contain the plaintext". 2016-01-06 07:15:06 +01:00
Florian Bruhin
f943891ce6 Fix :reload test when :stop is skipped.
I don't know why, but :stop being skipped causes something to be cached with
hello2.txt.
2016-01-05 22:46:52 +01:00
Florian Bruhin
0ce9b28da7 Skip :stop test on OS X.
This triggers the OS X kernel bug explained here:
https://bitbucket.org/cherrypy/cherrypy/pull-requests/117/

Fixes #1183.
2016-01-05 20:13:25 +01:00
Florian Bruhin
a97ba9aa09 Merge branch 'pdfjs' of https://github.com/Kingdread/qutebrowser into Kingdread-pdfjs 2016-01-05 07:21:26 +01:00
Florian Bruhin
705d77abfb Also handle the doc path not existing at all. 2016-01-04 20:36:15 +01:00
Florian Bruhin
20faecc7a0 Also handle inexistant doc path. 2016-01-04 20:35:16 +01:00
Florian Bruhin
ea182934f3 Update docs for :help tests. 2016-01-04 20:10:17 +01:00
Florian Bruhin
a5f2ac5f03 Adjust copyright years. 2016-01-04 07:12:39 +01:00
Daniel Schadt
6d02ef68ec Add BDD tests for pdfjs integration 2015-12-20 20:00:56 +01:00
Florian Bruhin
fcf94fd527 Remove various deprecated commands/arguments. 2015-12-20 18:38:29 +01:00
Florian Bruhin
d3dc90cb2a Revert "tests: Use urllib to load redirect-later-continue."
This reverts commit 1e43b882ae.
Seems like this causes other trouble (the redirect-later request missing?!)
2015-12-18 20:24:03 +01:00
Florian Bruhin
1e43b882ae tests: Use urllib to load redirect-later-continue.
This might avoid the EPROTOTYPE bug on OS X. See #1183.
2015-12-18 19:57:15 +01:00
Florian Bruhin
b3e4ac8043 tests: Fix AttributeError in _wait_for_clipboard. 2015-12-18 07:18:27 +01:00
Florian Bruhin
45d6dc6aa3 tests: Hopefully fix keyinput.feature flakiness.
While the original "no focused webview" bug (with the first test after spawning
qutebrowser) from #1183 was fixed, we still had a case where the next test
after ":fake-key sending key to the website with other window focused" failed,
presumably because the inspector was still focused, e.g. here:

http://qutebrowser.org:8010/builders/osx/builds/1175/steps/tests/logs/stdio

This hopefully fixes this by properly waiting until the inspector is gone.
2015-12-18 07:13:16 +01:00
Florian Bruhin
172157ed0d Remove unused import, take two. 2015-12-17 23:09:11 +01:00
Florian Bruhin
a7dee6c053 Remove unused import. 2015-12-17 22:57:16 +01:00
Florian Bruhin
fc84e58043 tests: Ignore "SelectionRequest too old" globally.
If we use pytestmark, it won't be ignored inside subprocess output, so our fix
from https://github.com/The-Compiler/qutebrowser/issues/1124#issuecomment-158073581
never actually worked.

See #1124 and #1183.
2015-12-17 22:33:07 +01:00
Florian Bruhin
8786e979a6 tests: Wait for data in the clipboard.
This should hopefully stabilize the flaky clipboard tests.
See #1183.
2015-12-17 22:17:38 +01:00
Florian Bruhin
982e78249a tests: Clear captured output between tests. 2015-12-16 23:07:42 +01:00
Florian Bruhin
a157f822d6 tests: Handle report.longrepr being a tuple.
For some unknown reason, report.longrepr.addsection might not exist, which
caused failures on OS X and Windows. If that happens, we just don't add a
section at all.
2015-12-16 22:47:33 +01:00
Florian Bruhin
e6284ed5d4 tests: Improve some ugly test IDs. 2015-12-16 22:21:29 +01:00
Florian Bruhin
bba6589e19 Capture qutebrowser/httpbin output separately.
When using print and relying on pytest to capture it as stdout, we ran into
this pytest/pytest-qt issue:

https://github.com/pytest-dev/pytest-qt/issues/113

Now we use our own capturing mechanism instead, which also means we get nicer
output.

Fixes #1122.
2015-12-16 21:25:13 +01:00
Florian Bruhin
fd96685b02 tests: Wait until the qutebrowser window has focus.
This should fix the second case in #1183 and other related flakiness in
keyinput.feature.
2015-12-15 07:43:14 +01:00
Florian Bruhin
e68965fea2 bdd: Wait for help pages to be loaded in tests.
This hopefully fixes #1150.
2015-12-02 22:22:31 +01:00
Florian Bruhin
4170e3c9af bdd: Simplify qute:settings test. 2015-12-02 22:19:43 +01:00
Florian Bruhin
d418f7f9fa Merge branch 'caret_mode_windows_osx' of https://github.com/artur-shaik/qutebrowser into artur-shaik-caret_mode_windows_osx 2015-12-02 06:22:27 +01:00
Panagiotis Ktistakis
6e8ac374dd Add tests for :tab-move wrapping. 2015-12-02 03:35:25 +02:00
Panagiotis Ktistakis
de3460da3e Wrap tabs on :tab-move +/- if tabs->wrap is true. 2015-12-02 03:17:54 +02:00
Florian Bruhin
b3515f5e82 pylint: Remove import-error disabling from tests. 2015-12-01 22:47:10 +01:00
Florian Bruhin
5817b47f75 Revert "Use fully qualified imports in tests."
Seems like this also breaks frozen tests...
This reverts commit c7fdcc92b8.
2015-12-01 22:45:59 +01:00
Florian Bruhin
c7fdcc92b8 Use fully qualified imports in tests.
This is cleaner even if pylint can't handle it.
2015-12-01 22:03:59 +01:00
Florian Bruhin
788a096150 pylint: Ignore import-error globally for tests. 2015-12-01 22:03:59 +01:00
Florian Bruhin
150a83d8f4 pylint: Remove unneeded supressions. 2015-12-01 22:03:58 +01:00
Florian Bruhin
d53c4f2702 tests: Increase test_late_message timeout.
This was failing on Travis on OS X, and waiting 1s for process start and 0.5s
sleep seems a bit tight.
2015-12-01 08:10:44 +01:00
Florian Bruhin
6f9b02741a Switch from map() to list comprehensions. 2015-12-01 07:16:32 +01:00
Patric Schmitz
98a454a428 log-javascript-console -> [none, debug, info] 2015-11-29 18:37:11 +01:00
Florian Bruhin
f7a3a9e015 Split testprocess.wait_for into two methods. 2015-11-29 01:23:19 +01:00