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
Kevin Velghe
ef6ffd6a3a
Add link_span.html
2016-03-31 09:36:13 +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
Florian Bruhin
6c7e2492e9
Merge branch 'dirbrowser-issue-1334' of https://github.com/Kingdread/qutebrowser into Kingdread-dirbrowser-issue-1334
2016-03-29 22:38:04 +02:00
Daniel Schadt
bd5b1f207d
fix lint
2016-03-29 21:02:54 +02:00
Daniel Schadt
3007fbf5c2
tests: add tests for quteproc.click_element
2016-03-29 20:52:23 +02:00
Daniel Schadt
f82d0f0c94
quteprocess: properly escape xpath expression
...
Since XPath doesn't have a way to escape quotes (or any other
character), we have to use a workaround by using concat() and switching
between quoting styles.
2016-03-29 20:34:40 +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
Daniel Schadt
b6c5ff25fd
tests: add click_element to quteprocess
2016-03-29 13:32:35 +02:00
Philipp Hansch
8a619ea84c
Prevent slashes from being stripped on Windows
2016-03-29 13:25:04 +02:00
Daniel Schadt
f085eb6eca
tests/dirbrowser: move parse out of DirLayout
2016-03-29 12:43:50 +02:00
Daniel Schadt
2db5b95552
tests: use "if not parent_elem"
...
Also add a new test for browsing the root directory
2016-03-29 12:36:43 +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
Daniel Schadt
6a96e1d6d8
quteprocess: remove duplicate code
2016-03-28 23:10:20 +02:00
Daniel Schadt
c0b40aefdd
tests/dirbrowser: normalize paths before comparing
...
This avoids errors because some libraries use '/' even on windows, while
others use '\' on windows.
2016-03-28 23:10:20 +02:00
Daniel Schadt
f6e8815871
tests: add integration tests for dirbrowser
2016-03-28 23:10:20 +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
Jakub Klinkovský
e121bd764f
hints: add another iframe test
2016-03-16 21:47:58 +01:00
Jakub Klinkovský
164df521c1
hints: add verifications for iframe tests
2016-03-16 20:59:46 +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
Florian Bruhin
a4687c6745
Fix lint
2016-02-27 02:41:01 +01:00
Florian Bruhin
83e86706ff
tests: Make check for ddg being loaded less strict
...
Before this change, adding a new logging message involving logging e.g. the
default duckduckgo setting value failed.
Now we basically use a black- instead of a whitelist and only fail if we get a
load status message for duckduckgo.
2016-02-27 02:16:42 +01:00
Jakub Klinkovský
d4ea62a834
hints: add xfailed tests for hinting inside iframes
2016-02-24 23:15:13 +01:00
Jakub Klinkovský
891a31a0ca
hints: move zoom tests to test_hints_html.py
2016-02-23 18:51:32 +01:00
Jakub Klinkovský
35ed70cfe0
hints: split tests into individual HTML files
2016-02-23 18:19:52 +01:00
Jakub Klinkovský
58d2d92d67
Merge remote-tracking branch 'upstream/master' into hints_clicking
...
* upstream/master: (22 commits)
Regenerate authors.
Only run geolocation tests on CI
Switch to flake8-docstrings with pydocstyle
Fix lint
Move pylint plugins to an installed package.
Include pytest-xvfb properly in frozen tests
tests: Handle trailing / in wait_for_load_finished.
Fix lint.
tox: Upgrade hypothesis to 3.0.2.
tests: Add first end-to-end test for hints.
hints: Log the used hint chars
bdd: use quteproc.wait_for_load_finished.
Remove xvfbwrapper from freeze_tests.py.
Regenerate authors.
Combine launch/crash time into one section.
Split long lines.
Switch to pytest-xvfb. Fixes #1309 .
no ellipsis is inserted in big windows
Regenerate authors.
fixes #1308
...
2016-02-23 17:40:02 +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
Jakub Klinkovský
52a9405f74
hints: fix descriptions of zoom tests
2016-02-21 12:53:03 +01:00
Florian Bruhin
b201b65669
tests: Handle trailing / in wait_for_load_finished.
...
We actually already added that in 16ec035418
, but
in 9a02dc174d
we accidentally dropped it again.
2016-02-19 06:42:23 +01:00
Florian Bruhin
6a077f5d5a
Fix lint.
2016-02-18 21:38:23 +01:00
Florian Bruhin
36b0e304fc
tests: Add first end-to-end test for hints.
...
This is based on HTML files with a global YAML comment, currently with "target"
as the only allowed key.
The tests then do this:
- Open a HTML file in data/hints/html
- Start hinting
- Make sure only one hint is visible
- Follow it, and make sure the page mentioned in "target:" is reached
Some ideas for the future:
- A "scroll" key, to scroll before hinting
- A "zoom" key, to zoom
- Multiple hints via a list
- Checking position of hints?
- A mode to manually check the pages (to check hint positions)
2016-02-18 20:46:15 +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
Jakub Klinkovský
97d2038528
hints: make sure that all hints stay visible in tests
2016-02-16 00:05:58 +01:00
Jakub Klinkovský
9799c30c2b
hints: add precision tests for different zoom levels
2016-02-15 23:31:49 +01:00
Jakub Klinkovský
239b7497e9
hints: simplify tests and make them more reliable
2016-02-15 20:41:54 +01:00
Jakub Klinkovský
748ec043fb
hints: add tests for links known to cause troubles
2016-02-15 19:02:29 +01:00
Florian Bruhin
74e168c339
Update Pygments test file.
2016-02-15 07:47:29 +01:00
Florian Bruhin
02f367a308
Add basic profiling capability for quteproc tests.
...
When --qute-profile-subprocs is given, we write a profile file for each
qutebrowser invocation and also create prof/combined.pstats afterwards.
2016-02-11 08:02:44 +01:00
Florian Bruhin
b6f1dd963d
Handle Shift-Insert correctly in prompt mode.
...
Fixes #1299 .
2016-02-10 06:40:54 +01:00
Florian Bruhin
eb692ba7f6
Fix lint.
2016-02-04 07:13:27 +01:00
Florian Bruhin
774bcbf6b3
tests: Don't fail on teardown too if test failed.
...
When a end-to-end test failed which would've marked an error message as
expected later in the test, seeing the teardown message about an unexpected
error being logged is really confusing.
2016-02-04 06:43:14 +01:00
Florian Bruhin
43b6f18864
Whoops, don't use repr(json.dumps(...))
2016-02-03 21:28:20 +01:00
Florian Bruhin
0b491f6caf
Use json.dumps for logged fake clipboard.
...
For some reason, when comparing the repr in the two processes, we get different
results on OS X and Windows:
- expected: "fünf"
- "f\xfcnf" coming back from the subprocess on OS X
- "fnf" on Windows
Instead we're comparing the json dump now, which should be more predictable.
2016-02-03 20:54:35 +01:00
Florian Bruhin
79f83a033d
Add a fake clipboard for tests
...
There are a lot of problems and flakiness with using a real clipboard.
Instead we now have a :debug-set-fake-clipboard command to set a text, and use
logging when getting the contents.
Fixes #1285 .
2016-02-03 20:27:11 +01:00
Florian Bruhin
921e8b50b7
Fix lint.
2016-02-03 08:16:59 +01:00
Florian Bruhin
3292c05340
tests: Display some more qutebrowser logs w/o -v.
...
50 lines of context is almost useless, e.g. when an exception occurs we don't
even see the traceback.
2016-02-03 07:55:10 +01:00
Florian Bruhin
6008adcb9f
bdd: xfail broken yankpaste tests for now.
...
Using the clipboard seems to be a good recipe for a lot of weird pain.
Until we avoid it altogether (see #1285 ) we xfail those problematic tests.
2016-02-03 07:49:45 +01:00
Florian Bruhin
302745e0fe
tests: Also poll clipboard after setting it.
2016-02-03 07:44:41 +01:00
Florian Bruhin
a90618128d
tests: Empty clipboard after testing if it works.
...
Otherwise, if a test fails to actually put something into the clipboard, we end
up pasting "Does this work?" which could e.g. trigger a search.
When it's cleared, we at least get some "clipboard is empty" error instead.
2016-02-03 06:55:21 +01:00
Florian Bruhin
af28996f82
tests: Fail if duckduckgo gets loaded accidentally
...
In the long run, we should detect any accidental external accesses using
mitmproxy, as per #1282 . In the meantime, we try to detect duckduckgo requests
being logged and fail the tests if that happens.
However, a duckduckgo URL is logged in fuzzy_url during startup/config init,
which is why we ignore it there.
2016-02-03 06:50:48 +01:00
Daniel Schadt
1e52f459c9
mhtml: new complex test case
...
The-Compiler wants a more beautiful test case since the old one was
pretty weird and took lots of explaining at pytest demos, so I made a
new one. This one is a bit nicer on the eye and - to say it with
The-Compiler's words - has no "weird pixelated globe with the
geocities-like background".
To compensate for the globe I've put in some trivia facts so that - if
you are one of the people that like to stare at test pages - you can
always learn something.
2016-02-02 22:23:40 +01:00
Florian Bruhin
cf0034d42c
Set __tracebackhide__ in quteproc.after_test
2016-02-02 19:16:45 +01:00
Florian Bruhin
14042403f6
Fix pasting of empty URLs.
2016-02-02 06:37:49 +01:00
Florian Bruhin
d50e1be566
Add some more :paste-primary tests.
2016-01-31 22:08:46 +01:00
Florian Bruhin
af5d199e8f
bdd: Simplify :paste-primary tests.
2016-01-31 20:56:37 +01:00
Florian Bruhin
44625b254c
Merge branch 'shift_ins' of https://github.com/lahwaacz/qutebrowser into lahwaacz-shift_ins
2016-01-31 19:46:41 +01:00
Jakub Klinkovský
5ec224d1f9
Simplified test for paste-primary command
...
We don't need to move around for this test...
2016-01-30 14:03:54 +01:00
Jakub Klinkovský
b358566156
Added tests for paste-primary command
2016-01-30 13:57:26 +01:00
Florian Bruhin
85adf7593d
Fix crash when downloading URL without path infos.
...
Fixes #1243 .
2016-01-26 22:39:10 +01:00
Florian Bruhin
ea1627c1e6
Cancel permission prompt when tab is closed.
...
Fixes #1250 .
2016-01-26 19:47:31 +01:00
Florian Bruhin
aede904b3a
bdd: Stabilize "Cloning to background tab" test.
...
I think this didn't actually wait until hello.txt was loaded because some logs
were parsed from the previous test:
http://www.qutebrowser.org/testresults/osx/1294.html
2016-01-24 19:17:39 +01:00
Florian Bruhin
be2c0e30b6
bdd: Stabilize "Closing a JS window twice" test.
...
After pressing the button to open a window, we have to wait until it's loaded
before continuing, otherwise the test is flaky:
http://www.qutebrowser.org/testresults/osx/1295.html
We can't simply wait with "wait until about:blank is loaded" as that page is
already loaded earlier.
2016-01-24 18:47:26 +01:00
Florian Bruhin
526441bcae
Fix new flake8 lint.
...
For some reason these issues weren't shown with pytest-pep8/flakes.
2016-01-22 17:33:58 +01:00
Florian Bruhin
3c625790cc
Don't crash if JS tab is closed twice.
...
Fixes #906 .
2016-01-20 21:24:51 +01:00
Florian Bruhin
6bd092a948
tests: Skip custom_environment_no_system on Win.
...
Seems like it's broken on AppVeyor for some reason.
2016-01-20 20:34:19 +01:00
Florian Bruhin
c02183652f
Fix starting with -c "" and add test.
...
Fixes #1169 .
2016-01-20 18:20:19 +01:00
Florian Bruhin
03118bd804
tests: Add a quteproc_new fixture.
...
This can be used to spawn a dedicated qutebrowser subprocess for a given test,
e.g. to test specific commandline arguments.
2016-01-20 18:19:29 +01:00
Florian Bruhin
039ae74662
tests: pass HOME to testprocess with custom env.
2016-01-20 18:19:05 +01:00
Florian Bruhin
10f3617b5e
tests: Only pass DISPLAY if it exists in the env.
2016-01-20 08:51:15 +01:00
Florian Bruhin
037be96718
tests: Increase testprocess.start timeout on CI.
...
Under some circumstances, starting qutebrowser needs more than 30 seconds
there.
2016-01-20 08:49:25 +01:00
Florian Bruhin
258855cf50
tests: Don't wait for testprocess if it quits.
2016-01-20 07:47:50 +01:00
Florian Bruhin
e944239ae8
tests: Simplify QuitPythonProcess.
2016-01-20 07:38:27 +01:00
Florian Bruhin
28258be599
tests: Add arg to set custom env for testprocess.
2016-01-20 07:34:56 +01:00
Florian Bruhin
d3f0c27a87
tests: Add testprocess.wait_for_quit.
...
This was in conftest.py before, but we might want to use it outside of that as
well.
2016-01-20 06:54:00 +01:00
Florian Bruhin
ef17c86586
tests: Allow custom args when starting testprocess.
2016-01-20 06:53:25 +01:00
Florian Bruhin
d9a58547b0
bdd: Add some more waiting to :undo tests.
2016-01-19 06:16:07 +01:00
Florian Bruhin
faed088735
Wait until tabs are loaded for last-close tests.
2016-01-18 23:08:16 +01:00
Florian Bruhin
dfcd3087c2
Increase timeout for test_quteprocess_quitting.
2016-01-18 23:00:41 +01:00
Florian Bruhin
1892915146
bdd: Increase timeout for should_quit even more.
2016-01-18 22:13:24 +01:00
Florian Bruhin
111f46adc5
bdd: Increase timeout for should_quit.
2016-01-18 08:11:38 +01:00
Florian Bruhin
9394f13a08
tests: Update hello.txt.html for pygments 2.1.
2016-01-18 08:11:38 +01:00
Florian Bruhin
3bf20c7c7b
tests: Adjust check_contents comparison.
...
When doing the read() during the assert we'd get a weird pytest output which
doesn't make sense.
2016-01-18 08:11:35 +01:00
Florian Bruhin
3864ae8aae
bdd: Wait until page is loaded (last-close tests).
2016-01-18 07:33:17 +01:00
Florian Bruhin
f7784e641e
bdd: Add some tests for tabs -> last-close.
2016-01-18 07:08:07 +01:00
Florian Bruhin
d6fafd474b
pylint: Disable no-member for http.client.*
...
Seems like this is potentially the same issue as
https://github.com/PyCQA/pylint/issues/399 , it also happens on the same
machines.
2016-01-17 21:27:24 +01:00
Florian Bruhin
0936ed4e61
Disable useless-suppression in webserver_sub_ssl.
...
Seems like this pylint bug doesn't happen on all systems...
2016-01-17 21:21:26 +01:00
Florian Bruhin
11dc51031d
tests: Increase timeout for quteprocess_quitting.
2016-01-17 21:20:28 +01:00
Florian Bruhin
9c5974c054
bdd: Add a "qutebrowser should quit" step.
2016-01-17 20:59:39 +01:00
Florian Bruhin
6e390bdc01
tests: Add a quteproc test for quitting.
2016-01-17 20:46:55 +01:00
Florian Bruhin
6c5e158fc5
tests: Add a test for a quitting testprocess.
2016-01-17 20:19:41 +01:00
Florian Bruhin
dd211adf0f
tests: Make sure testprocess raises if start fails.
2016-01-17 20:18:07 +01:00
Florian Bruhin
6774894e9e
tests: Check HTTP server status per path.
...
Stricter and simpler, ha! :)
2016-01-15 07:13:45 +01:00
Florian Bruhin
40721a2b6b
bdd: Wait until basic-auth page is fully loaded.
...
This hopefully fixes this flakyness in
test_successful_webpage_authentification:
tests/integration/features/test_prompts.py:129:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[...]
tests/integration/features/conftest.py:381: in check_contents_json
actual = json.loads(content)
/usr/lib/python3.4/json/__init__.py:318: in loads
return _default_decoder.decode(s)
/usr/lib/python3.4/json/decoder.py:343: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[...]
> raise ValueError(errmsg("Expecting value", s, err.value)) from None
E ValueError: Expecting value: line 1 column 1 (char 0)
2016-01-15 06:51:48 +01:00
Florian Bruhin
6420cdaa26
bdd: Open geolocation/notification page in new tab
...
This hopefully fixes this flaky error in test_notifications_with_ask__true on
OS X:
Failed: Logged unexpected errors:
LogLine('22:40:06 DEBUG js webpage:javaScriptConsoleMessage:531 [http://localhost:57758/data/prompt/notifications.html:28 ] [FAIL] unknown initial value for Notification.permission: denied')
[...]
testprocess.WaitForTimeout: Timed out after 15000ms waiting for {'message': 'Entering mode KeyMode.* (reason: question asked)'}.
2016-01-15 06:44:01 +01:00
Florian Bruhin
5856b24d20
bdd: Compare HTTP status to a whitelist.
...
401 (authorization required) is not < 400, and it makes more sense to be strict
here anyways.
2016-01-14 22:34:26 +01:00
Florian Bruhin
cda6d7c06d
bdd: Add test for webpage authentication.
2016-01-14 22:27:09 +01:00
Florian Bruhin
573654ece1
bdd: Add check_contents_json.
2016-01-14 22:27:00 +01:00
Florian Bruhin
c79f013050
bdd: Allow to load a page without waiting for it.
2016-01-14 22:26:42 +01:00
Florian Bruhin
23107a242b
bdd: Ignore POSITION_UNAVAILABLE for geolocation.
2016-01-14 20:40:46 +01:00
Florian Bruhin
0b116729f7
bdd: Fix skipping tests from JS.
...
With the previous solution, we'd call pytest.skip on teardown only, which means
the rest of the test (e.g. because of a wait_for) could still fail.
2016-01-14 20:32:17 +01:00
Florian Bruhin
b8a50dc475
bdd: Log error code on geolocation errors.
2016-01-14 19:04:48 +01:00
Florian Bruhin
e7a816c0c0
bdd: Skip geolocation tests if it's unavailable.
...
This should unbreak the build with older Qt versions.
2016-01-14 18:51:28 +01:00
Florian Bruhin
9c87eaf371
bdd: Allow to skip a test from JS.
...
This is a bit tricky since the test will actually run, but be marked as
skipped. The problem is we can't raise a pytest.skip.Exception during a test,
or it'll show up as an exception in a virtual Qt method.
Still this is better than nothing.
2016-01-14 18:50:36 +01:00
Florian Bruhin
14ff684e99
bdd: Add a xfail_norun marker.
2016-01-14 07:53:00 +01:00
Florian Bruhin
cf09e477a4
bdd: Add some tests for HTML5 notifications.
2016-01-14 07:49:39 +01:00
Florian Bruhin
1ddf817f4c
bdd: Add some tests for geolocation.
2016-01-14 07:30:52 +01:00
Florian Bruhin
252dc5bf1b
bdd: Add ability to fail tests from javascript.
2016-01-14 07:03:55 +01:00
Florian Bruhin
1d63e2dff4
bdd: Make "I wait for a prompt" step explicit.
2016-01-14 07:03:55 +01:00
Florian Bruhin
abcb366c12
bdd: Add some more SSL tests.
2016-01-13 22:36:45 +01:00
Florian Bruhin
d0fda5467a
bdd: Add a "I wait for a prompt" step.
2016-01-13 22:36:45 +01:00
Florian Bruhin
9c2a38938d
bdd: Clear SSL errors before SSL test.
2016-01-13 22:36:45 +01:00
Florian Bruhin
0e631a2c11
bdd: Mark should_be_logged messages as expected.
2016-01-13 22:36:45 +01:00
Florian Bruhin
2fbf218a0f
bdd: Use textwrap.dedent.
2016-01-13 18:29:14 +01:00
Florian Bruhin
7ccc58bb68
Remove empty line.
2016-01-13 18:13:16 +01:00
Florian Bruhin
6c916d166d
Merge branch 'master' of https://github.com/hcraT/qutebrowser into hcraT-master
2016-01-13 18:12:37 +01:00
Florian Bruhin
e17a332400
Fix lint.
2016-01-13 07:01:31 +01:00
Florian Bruhin
0ca9cd361a
Fix webserver_sub_ssl file header.
2016-01-13 00:00:55 +01:00
Florian Bruhin
f515165140
Add docstring.
2016-01-12 23:51:36 +01:00
Florian Bruhin
5f2ca88176
bdd: Don't test exact SSL error text.
...
Turns out those are platform specific.
2016-01-12 23:50:25 +01:00
Florian Bruhin
9479b65d25
bdd: Add first SSL test.
2016-01-12 23:35:48 +01:00
Florian Bruhin
8dd7f080f4
tests: Default to 5s timeout if not on CI.
2016-01-12 22:49:54 +01:00