Florian Bruhin
cf6cffeb08
tests: Ignore "Xlib: sequence lost" error
2016-09-06 22:10:34 +02:00
Florian Bruhin
e3e7366863
Make pylint shut up
2016-09-06 21:21:37 +02:00
Florian Bruhin
c58a0e926f
Skip scrolling tests on Qt < 5.7
...
This fixes tests on OS X on Travis, since Homebrew is still on Qt 5.6.
2016-09-06 20:29:58 +02:00
Florian Bruhin
c6d6483929
bdd: Show what exactly failed with InvalidLine
2016-09-06 17:00:25 +02:00
Florian Bruhin
7f013b7808
Fix lint
2016-09-06 17:00:25 +02:00
Florian Bruhin
ce1b2e6f15
quteprocess: Only wait for first about:blank load
...
We accidentally marked all about:blank lines as waited for...
2016-09-06 17:00:25 +02:00
Florian Bruhin
c07ff15b9b
bdd: Display milliseconds in log output
2016-09-06 17:00:25 +02:00
Florian Bruhin
52649aea70
bdd: Improve output when line was already found
2016-09-06 15:55:22 +02:00
Florian Bruhin
db7de0d619
tests: Set waited_for for initial about:blank load
...
Otherwise, subsequent lines where we wait for about:blank will fall back
on the older one and not actually wait.
2016-09-06 15:50:36 +02:00
Florian Bruhin
85b3d08c66
bdd: Fix scrolling tests with QtWebEngine
...
Scrolling happens async with QtWebEngine, so we add a new log output
when the page was scrolled, and wait for that in various places.
2016-09-06 14:58:33 +02:00
Florian Bruhin
26aeff2332
testprocess: Don't fail if it was never started
2016-09-06 08:05:23 +02:00
Florian Bruhin
ba718a2b9d
end2end: Improve output when subprocess exits
...
We don't really have the "infrastructure" set up yet to have proper log
output at that point, but we can always just show the log output as part
of the exception.
2016-09-05 16:19:22 +02:00
Florian Bruhin
19ac488997
tests: Add QUTE_BDD_WEBENGINE environment variable
2016-09-05 15:08:00 +02:00
Florian Bruhin
2650d9350d
bdd: Improve webserver error on unexpected status
...
pytest 3.0 removed the assertion reinterpretation which made this nice:
https://github.com/pytest-dev/pytest/issues/1871
2016-08-25 22:58:14 +02:00
Florian Bruhin
77aa8b4337
pylint: Use ignored-modules for pytest
...
See https://github.com/PyCQA/astroid/pull/357
2016-08-23 07:45:31 +02:00
Florian Bruhin
3b6286f71a
Remove old pylint suppression for ssl.PROTOCOL_*
2016-08-23 07:45:15 +02:00
Florian Bruhin
23c4c89a0f
tests: Set __tracebackhide__ to a callable
...
This allows us to only filter the exceptions we actually want to hide.
See #1877
2016-08-23 07:28:08 +02:00
Florian Bruhin
df3733af54
tests: Use pytest.fixture instead of yield_fixture
...
See #1877
2016-08-22 07:40:24 +02:00
Florian Bruhin
80a3920aad
Revert "Revert "tests: Use getfixturevalue""
...
This reverts commit c8fe21c85f
.
2016-08-22 07:24:17 +02:00
Florian Bruhin
c8fe21c85f
Revert "tests: Use getfixturevalue"
...
This reverts commit 961d33b712
.
2016-08-21 16:59:54 +02:00
Florian Bruhin
961d33b712
tests: Use getfixturevalue
...
See #1877
2016-08-21 16:18:33 +02:00
Florian Bruhin
b5444338ba
Fix lint
2016-08-19 13:35:39 +02:00
Florian Bruhin
2eae6a0603
bdd: Wait less for xfailing tests
...
We now divide all timeouts by ten for xfailing tests, with the hope to
still catch newly passing tests, but not spend too much time waiting.
With a quick test, this reduced the testsuite run length from 12 to
7-8 minutes.
2016-08-19 13:11:29 +02:00
Florian Bruhin
362c23692a
Change quteproc._request back to quteproc.request
...
Otherwise our per-test quteproc fixture wouldn't set the 'request'
object properly from the outside, and quteproc always had a module as
request.node.
2016-08-19 13:05:59 +02:00
Florian Bruhin
6cd890aa19
bdd: Set request object on QuteProc
2016-08-19 12:15:50 +02:00
Florian Bruhin
c0c3279424
Fix test_quteprocess.test_set with QtWebEngine
...
network -> accept-language is not available for QtWebEngine, and we
simply need a setting which accepts an arbitrary string.
2016-08-19 11:25:59 +02:00
Florian Bruhin
914ce85780
tests: Fix quteproc_new fixture
2016-08-18 23:31:18 +02:00
Florian Bruhin
1c581cf1cf
quteproc: Ignore failing messages on xfail
...
When a test calls pytest.xfail it might stop early, so the message
doesn't get marked as ignored.
2016-08-18 22:23:29 +02:00
Florian Bruhin
788eebc1ad
bdd: Ignore "Running without the SUID sandbox!"
2016-08-18 19:29:34 +02:00
Florian Bruhin
0b9aec873f
tests: Accept HTTP "not modified" as status
...
It seems like QtWebEngine sends some caching headers QtWebKit didn't?
2016-08-18 17:44:35 +02:00
Florian Bruhin
0cef4ac2db
Add a :click-element command
2016-08-18 15:30:04 +02:00
Florian Bruhin
da73a7123c
Add quteproc.click_element_by_id
2016-08-18 13:24:47 +02:00
Niklas Haas
c2cc28a72b
Add new-instance-open-target.window = first-opened
...
Fixes #1060 .
In the process of adding this, I also decided to rewrite
mainwindow.get_window() for clarity (and also because flake8 was warning
about complexity).
Also adds some tests to the new-instance-target mechanism, in particular
a specific test for the issue in question.
2016-08-16 12:24:38 +02:00
Florian Bruhin
a35b6e2279
Fix testprocess test for custom environment
2016-08-10 14:02:04 +02:00
Florian Bruhin
e51b763c93
testproc: Pass through full system environment
...
Let's just rely on tox for environment isolation, otherwise we just
break stuff on Windows.
2016-08-10 13:23:15 +02:00
Florian Bruhin
75bdd1f797
quteproc: pass through QT_QPA_PLATFORM_PLUGIN_PATH
2016-08-10 10:33:26 +02:00
Florian Bruhin
9aa6c8cf36
Automatically terminate quteproc_new after a test
...
This means we don't get a QProcess message because of test_no_loglines
not sending :quit, and we don't need to do so in test_ascii_locale as
there's nothing we need to wait for.
2016-08-10 09:30:24 +02:00
Niklas Haas
6d181e5c6f
Add new-instance-open-target.window setting
...
This adds the ability to open new tabs in the last-focused window
instead, which fixes #1801 .
Right now the only other option is probably not that useful for human
users but it's required to make tests behave deterministically and
consistently. (But with #881 on the roadmap, I would implement this as
another choice)
To this end, also make the test framework set this option to preserve
the invariant against which existing tests are written: that spawning a
new window would effectively also focus it.
2016-08-10 00:06:12 +02:00
Florian Bruhin
2d48a8013f
tests: Don't set ssl-strict with QtWebEngine
2016-08-09 15:13:26 +02:00
Florian Bruhin
08b70f0f4c
Add qutebrowser.utils.javascript
...
webelem.javascript_escape got renamed to javascript.string_escape, and a
new javascript.assemble got added to make it easier to call a function
inside a .js file.
2016-08-04 17:53:13 +02:00
Florian Bruhin
23ce4561c8
Fix lint
2016-08-03 16:48:48 +02:00
Florian Bruhin
9851a13981
Add utils.random_port()
2016-08-03 13:08:55 +02:00
Florian Bruhin
a49c524b00
tests: Ensure LogLine gets the right json type
2016-08-03 09:06:58 +02:00
Florian Bruhin
190db8bf5e
Also pass -bb to python for end2end tests
2016-07-28 07:19:59 +02:00
Florian Bruhin
83906d223a
Remove unneeded pylint suppression
...
In the last CherryPy update, cherrypy.wsgiserver got converted to a
single module. While this issue still exists in pylint, we don't get it
here anymore.
2016-07-15 11:09:51 +02:00
Florian Bruhin
e0ab70c8cf
end2end tests: Don't fail with "STUB:" warnings
...
We have some things like pos_px stubbed which will fail any test because
of the stub warning - but some tests don't actually need that, it just
happens when e.g. loading something.
So let's not fail tests based on stub warnings, and see how much works
that way.
2016-07-13 10:55:04 +02:00
Florian Bruhin
e5cab11979
Escape backslashes in end2end test commands
...
Let's hope this fixes stuff on Windows where \ is used as path
separator...
2016-07-12 17:52:05 +02:00
Florian Bruhin
d91c922b4c
Add --qute-bdd-webengine switch for end2end tests
2016-07-11 17:24:03 +02:00
Florian Bruhin
bf286f8c74
Fix some tests
2016-07-07 18:32:52 +02:00
Florian Bruhin
70117265d6
Fix some a/an misspellings
...
Thanks to https://github.com/jwilk/anorack
2016-07-05 08:34:03 +02:00