Florian Bruhin
2281f0c790
Fix :insert-text test for QtWebEngine
2016-09-12 15:59:23 +02:00
Florian Bruhin
b2608d7697
Add --world to :jseval
2016-09-12 15:59:17 +02:00
Florian Bruhin
fa78cc9f69
tests: Allow to mark JS errors as expected
2016-09-12 15:57:02 +02:00
Florian Bruhin
b645a88ade
Stabilize :insert-text tests
...
With QtWebEngine, inserting text into the field is async, so if our
test runs too fast, it would fail. Now we instead log stuff via JS on
changes insteaad, and wait for those log messages in the tests.
2016-09-12 15:25:03 +02:00
Florian Bruhin
d988f919d7
Fix test_quteprocess.py
2016-09-12 12:01:31 +02:00
Florian Bruhin
2388489038
downloads: Be okay with the tmpdir being gone
2016-09-12 11:30:44 +02:00
Florian Bruhin
38a3d118ab
Nicer linebreaking in _render_log
2016-09-12 11:24:57 +02:00
Florian Bruhin
469c75662e
Fix docstring
2016-09-12 11:24:20 +02:00
Florian Bruhin
8afb02eef7
bdd: Don't log VDEBUG lines without --verbose
2016-09-12 11:23:56 +02:00
Florian Bruhin
fff777404b
Use QApplication.postEvent again
...
We had some funny segfaults reported during scrolling (i.e. with
QApplication.sendEvent), and some code already had to use postpone=True
so there was no segfault...
So now we're back to postEvent again, and eliminated the main reason for
segfaults with it, which was re-using (and -posting) events which had
already been posted.
At least during tests this seems to run stable, let's hope it helps for
the people having crashes as well.
2016-09-11 19:37:09 +02:00
Florian Bruhin
ac7ee5ed8b
Stabilize :tab-clone tests
...
Those were flaky with QtWebEngine on OS X:
https://travis-ci.org/The-Compiler/qutebrowser/jobs/159094434
2016-09-11 16:22:20 +02:00
Florian Bruhin
101d30fe1e
Make _get_echo_exe_path() private in bdd conftest
2016-09-11 16:15:27 +02:00
Florian Bruhin
1fe2579bb1
Merge branch 'windows-userscripts' of https://github.com/Kingdread/qutebrowser into Kingdread-windows-userscripts
2016-09-11 16:14:25 +02:00
Florian Bruhin
11ee5befcc
Fix download tests on Windows
2016-09-11 15:53:46 +02:00
Florian Bruhin
b949e4d73a
Start splitting DownloadModel from DownloadManager
...
This mostly works, apart from remove_item/remove_items not being
available on the model.
2016-09-11 14:58:07 +02:00
Florian Bruhin
4c55963dc3
Fix lint
2016-09-10 17:32:04 +02:00
Florian Bruhin
b2d8905d68
Remove {downloaddir} in downloads.feature
...
We can just use (tmpdir) instead which we already use everywhere else as
well.
2016-09-10 16:42:27 +02:00
Florian Bruhin
0ba74ad023
Add Qt model test for download model
2016-09-10 16:42:26 +02:00
Florian Bruhin
d13f88f0ac
Add lots of new BDD tests for downloads
2016-09-10 16:42:26 +02:00
Florian Bruhin
dc8396986e
FIx expected message in test_invocations
2016-09-10 16:42:26 +02:00
Florian Bruhin
a21cd9f56e
Set remove-finished-downloads in download tests
2016-09-10 16:42:26 +02:00
Florian Bruhin
17caf80f2a
bdd: Add "I wait for the javascript message" step
2016-09-10 16:42:26 +02:00
Florian Bruhin
9f1aacc4f0
Move pdfjs check to the end2end conftest
2016-09-10 16:24:31 +02:00
Florian Bruhin
230cd40b12
Add a test for a misconfigured XDG_DOWNLOAD_DIR
...
See #866 and #1269 .
2016-09-09 18:46:51 +02:00
Florian Bruhin
a4d0449e19
Use a shorter XDG_RUNTIME_DIR for temp_basedir_env
...
Otherwise with longer test names, we can't listen to the IPC server as
the filename is too long for a local socket.
2016-09-09 18:46:51 +02:00
Florian Bruhin
143a4af91b
Improve :download-open tests
2016-09-09 18:46:51 +02:00
Florian Bruhin
2df971a79c
Move short_tmpdir fixture to conftest.py
2016-09-09 18:46:51 +02:00
Florian Bruhin
b5b46332c7
Add test for downloading to an inexistent dir
2016-09-09 18:46:51 +02:00
Florian Bruhin
d64241bed9
Add a test for a download without content-size
2016-09-09 18:46:51 +02:00
Florian Bruhin
2177aa574c
Improve download BDD tests
...
This reorganizes the existing tests a bit and adds some new ones.
2016-09-09 18:46:51 +02:00
Florian Bruhin
7611281563
Add basename to "download finished" message
2016-09-09 18:46:51 +02:00
Florian Bruhin
864ec94cde
Fix lint
2016-09-09 17:56:58 +02:00
knaggita
9ff3f6810a
Remove --qt-* arguments
2016-09-09 17:55:16 +02:00
Florian Bruhin
d0cf452ec8
Remove :prompt-yes and :prompt-no
...
Those are replaced by :prompt-accept yes and :prompt-accept no
2016-09-09 15:59:00 +02:00
Florian Bruhin
d579697245
Add a value argument to :prompt-accept
2016-09-09 15:48:42 +02:00
Florian Bruhin
71a89bd418
*Really* fix completion with multiple words.
...
Turns out re.escape also escapes spaces, so we'd need to replace '(\\ )'
groups after escaping. At this point it's easier to just combine spaces
before escaping the pattern.
Fixes #1934 .
Supersedes #1935 .
2016-09-09 09:03:18 +02:00
Daniel Schadt
b0114768c7
fix spawn tests on Windows
...
On Windows, no echo.exe exists normally, so calling echo from the tests
is no good idea, since it relies on Cygwin to be installed and in %PATH%
(so that echo.exe is available).
This fixes this by providing a small echo.bat which is callable from the
tests, and then using a platform-specific path to the executable instead
of the hardcoded "echo". This should ensure that the tests pass even on
systems where echo.exe is not installed.
Note that we can't simply use a do-nothing exe (like rundll or hh.exe),
as we're passing parameters, and those executables may behave
differently in the presence of those parameters.
2016-09-08 23:14:10 +02:00
Daniel Schadt
f6c6f766cd
add newline at the end of the file
2016-09-08 23:13:00 +02:00
Florian Bruhin
0a3853fcb7
Fix handling of spaces in completion
...
This is a regression introduced in
faa052ad6f
.
Fixes #1934 .
2016-09-08 21:59:18 +02:00
Florian Bruhin
93428c4e2b
Skip instead of xfail JS prompt test on WebEngine
...
We probably get stuck with a visual JS prompt, so for some reason the
following header tests fail.
2016-09-07 20:25:56 +02:00
Florian Bruhin
26025214ed
Mark session loading tests with @qtwebengine_flaky
2016-09-07 19:03:41 +02:00
Florian Bruhin
a119e9d5b0
Mark :insert-text with undo test as xfail on OS X
2016-09-07 19:01:24 +02:00
Florian Bruhin
d299fd260c
Fix adblock tests
2016-09-07 18:53:11 +02:00
Florian Bruhin
f3d540b375
Fix adblock tests
2016-09-07 18:47:39 +02:00
Florian Bruhin
44d1056e54
QtWebEngine: Implement custom HTTP headers
2016-09-07 18:29:38 +02:00
Florian Bruhin
3ce9e795a1
Add a simple end2end test for :adblock-update
2016-09-07 16:27:27 +02:00
Florian Bruhin
8cef35517f
Add a manual test file for uploading files
2016-09-07 13:40:05 +02:00
Florian Bruhin
fca37abf55
QtWebEngine: Implement webelem.classes
2016-09-07 12:31:48 +02:00
Florian Bruhin
522049132b
Add a test for hinting with ACE editor
2016-09-07 12:28:12 +02:00
Florian Bruhin
3e1583bb1c
Make WebKitElement._is_visible private
...
It makes a lot of sense for this to be in webkitelem.py, but it should
not be public API as it's only used internally and can't be implemented
here with QtWebEngine.
2016-09-07 11:58:39 +02:00
Florian Bruhin
60c86a08c4
Get rid of WebElement.debug_text
2016-09-07 11:47:39 +02:00
Florian Bruhin
2da827462e
Add a test to make sure check_coverage files exist
2016-09-07 11:37:21 +02:00
Florian Bruhin
e700d11447
Add check_vanished() in webkitelem.insert_text
2016-09-07 11:29:26 +02:00
Florian Bruhin
8f9cfcf232
Get rid of webelem.run_js_async
2016-09-07 11:27:37 +02:00
Florian Bruhin
78d64f4791
Get rid of webkitelem.focus_elem
2016-09-07 11:24:28 +02:00
Florian Bruhin
c267776491
Add missing :leave-mode for insert-mode test
...
Otherwise we hint while still in insert mode - while this seems to work
fine, let's do things the cleaner way.
2016-09-07 11:21:27 +02:00
Florian Bruhin
948fa033c7
Implement :insert-text for QtWebEngine
2016-09-07 11:20:32 +02:00
Florian Bruhin
ee5a972069
Move auto-insert-mode handling to browsertab
...
This means auto-insert-mode now works correctly with QtWebEngine.
2016-09-07 10:24:27 +02:00
Florian Bruhin
919196714b
QtWebEngine: Implement WebEngineScroller.at_bottom
2016-09-07 09:32:51 +02:00
Florian Bruhin
cf6cffeb08
tests: Ignore "Xlib: sequence lost" error
2016-09-06 22:10:34 +02:00
Florian Bruhin
08302c5a5f
Apply @qtwebengine_flaky (too) liberally
2016-09-06 22:10:28 +02:00
Florian Bruhin
1106104700
Add a @qtwebengine_flaky marker
2016-09-06 21:43:02 +02:00
Florian Bruhin
37b1c26e1c
Don't check active win for WebEngine session test
2016-09-06 21:22:50 +02:00
Florian Bruhin
e3e7366863
Make pylint shut up
2016-09-06 21:21:37 +02:00
Daniel Schadt
22ac19b151
style fixes
2016-09-06 20:33:48 +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
22d9c49169
Stabilize scrolling in :repeat-command test
2016-09-06 19:34:38 +02:00
Florian Bruhin
010a52efb8
Stabilize :tab-detach test in invoke.feature
...
When we detach a tab, we need to wait until the page is actually loaded
in the newly detached tab before saving the session.
2016-09-06 19:33:09 +02:00
Florian Bruhin
c59a1535c5
Don't check active window in session test
...
This is flaky as we don't know which window is actually focused.
2016-09-06 19:29:12 +02:00
Daniel Schadt
0ab1902c98
add an userscript test for Windows
2016-09-06 18:41:24 +02:00
nanjekyejoannah
d3e19ec8fc
Add general -> yank-ignored-url-parameters
2016-09-06 18:19:40 +02:00
Florian Bruhin
e77bf62ace
Remove unnecessary @qtwebengine_createWindow tags
...
Since we did now remove the error message, some more tests actually run
fine without the createWindow patch.
2016-09-06 18:04:54 +02:00
Florian Bruhin
7356e32b94
QtWebEngine: Don't search the Holy Grail
2016-09-06 17:38:13 +02:00
Florian Bruhin
fcaadb9352
Stabilize :save-session --force test
2016-09-06 17:04:13 +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
8b3517af7b
bdd: Skip another flaky QtWebEngine tabs test
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
82180429ed
Add missing wait in :undo test
2016-09-06 15:50:27 +02:00
Florian Bruhin
4b431fdf61
Add some more @qtwebengine_createWindow tags
2016-09-06 15:28:30 +02:00
Florian Bruhin
8a5d7455c1
Skip some broken :undo tests with QtWebEngine
2016-09-06 15:28:19 +02:00
Florian Bruhin
7b9b08a167
QtWebEngine: Fix session tests
2016-09-06 15:13:43 +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
f6392d730f
Stabilize test in invoke.feature
...
When we use about:blank, the wait doesn't actually wait (because we
already did open about:blank earlier), so we need to use another URL or
this test will be flaky.
2016-09-06 14:04:54 +02:00
Florian Bruhin
2e49368b51
Add missing @qtwebengine_createWindow tag
2016-09-06 13:56:41 +02:00
Florian Bruhin
1ed637a906
QtWebEngine: Initial session implementation
2016-09-06 13:55:35 +02:00
Florian Bruhin
4f55b435f0
Move various session unit tests to BDD tests
2016-09-06 13:55:28 +02:00
Florian Bruhin
f6ba859896
Move tabhistory.TabHistoryItem to misc.sessions
...
This makes browser.webkit.tabhistory contain only QtWebKit-specific
code.
2016-09-06 09:50:55 +02:00
Florian Bruhin
108c091894
Get rid of test_smoke.py
...
If anything is broken in those tests, other tests are going to be broken
as well, so this is just a waste of time.
2016-09-06 08:05:23 +02:00
Florian Bruhin
26aeff2332
testprocess: Don't fail if it was never started
2016-09-06 08:05:23 +02:00
Florian Bruhin
d819ce1b18
Read --qute-bdd-webengine in test_invocations.py
2016-09-06 08:05:16 +02:00
Florian Bruhin
cf44019475
Don't require QtWebEngine for history tests
2016-09-05 22:25:20 +02:00
Florian Bruhin
ff5bfced9d
Skip flaky QtWebEngine :forward test
2016-09-05 22:05:12 +02:00
Florian Bruhin
1e0f97b64d
pylint: Disable invalid-name in helpers/fixtures
2016-09-05 21:32:45 +02:00
Florian Bruhin
7592345b6e
Make unittests work without QtWebKit
2016-09-05 18:45:50 +02:00
Florian Bruhin
59300cb71e
Add tests for js-can-open-windows-automatically
2016-09-05 17:25:52 +02:00
Florian Bruhin
0b3656c446
tests: Don't wait for nonexistant log message
2016-09-05 17:25:41 +02:00
Florian Bruhin
525d5ce922
Mark another flaky test with @qtwebengine_skip
2016-09-05 17:10:30 +02:00
Florian Bruhin
d2a3541d6e
Make pylint shut up
2016-09-05 16:54:31 +02:00
Florian Bruhin
22be46e7d3
Skip flaky QtWebEngine test
2016-09-05 16:53:27 +02:00
Florian Bruhin
f26ce3a8ff
Only add BDD markers if condition matches
...
This should make multiple markers on the same test work correctly.
2016-09-05 16:49:17 +02:00
Florian Bruhin
bdc1885f6d
Add missing @qtwebengine_createWindow marker
2016-09-05 16:48:21 +02:00
Florian Bruhin
a94cf90842
Fail early when running WebEngine tests without it
2016-09-05 16:33:06 +02:00
Florian Bruhin
61270b8f92
Fix lint
2016-09-05 16:21:30 +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
c6142df3ec
bdd: Re-add test for #906 for QtWebEngine
2016-09-05 15:53:31 +02:00
Florian Bruhin
6151a5faa7
bdd: Fix handling of @qtweb{kit_engine}_* tags
2016-09-05 15:53:19 +02:00
Florian Bruhin
21fe8f43f9
tests: Fix handling of QUTE_BDD_WEBENGINE
...
The tryfirst decorator somehow messed up handling of other pytest
marks... Also we need to do this in the root conftest for it to work
properly.
2016-09-05 15:32:12 +02:00
Florian Bruhin
f2c4cedf61
QtWebEngine: Don't add invalid URLs to history
2016-09-05 15:08:00 +02:00
Florian Bruhin
8115fa2af8
Re-enable some createWindow tests
2016-09-05 15:08:00 +02:00
Florian Bruhin
a52c8d6576
Clean up javascript double-close test
...
The test for QtWebEngine was removed because something weird happened
with the two pytest-bdd tags, and I'm too annoyed with everything being
broken to investigate now... Future me, I'm sorry.
2016-09-05 15:08:00 +02:00
Florian Bruhin
ce98d89352
Add some (crashing...) window.open/.close tests
2016-09-05 15:08:00 +02:00
Florian Bruhin
cf89204ac3
Only skip because of QTBUG-54419 with WebEngine
2016-09-05 15:08:00 +02:00
Florian Bruhin
141b7c5893
Increase timeout in auto-follow-timeout test
2016-09-05 15:08:00 +02:00
Florian Bruhin
ebf093bb6e
tests: Skip unittests with QUTE_BDD_WEBENGINE
2016-09-05 15:08:00 +02:00
Florian Bruhin
aec0e4ca40
tests: Fix applying of end2end marker
2016-09-05 15:08:00 +02:00
Florian Bruhin
19ac488997
tests: Add QUTE_BDD_WEBENGINE environment variable
2016-09-05 15:08:00 +02:00
Florian Bruhin
cf070d48f2
WebEngine: Disable createWindow for Qt < 5.7.1
...
Fixes #1911 .
The bugfix is backported in my qt5-webengine-debug package, and
QUTE_QTBUG54419_PATCHED can be set to force qutebrowser to use
createWindow.
2016-09-05 15:08:00 +02:00
Florian Bruhin
2c2375ff18
Add a separate QtWebEngine test for #906
2016-09-05 15:08:00 +02:00
Florian Bruhin
30327b2acf
Move end2end tag handling to end2end/conftest.py
2016-09-05 15:08:00 +02:00
Florian Bruhin
6c6e98aac4
Add a @qtwebkit_skip marker
2016-09-05 15:08:00 +02:00
Florian Bruhin
30c07e9b5c
tests: Add url to window_open.html
2016-09-05 15:08:00 +02:00
Florian Bruhin
a4cd0291a6
Implement QWebEngineView.createWindow
2016-09-05 15:08:00 +02:00
Florian Bruhin
a85ea92a21
Merge branch 'open-editor-all-modes' of https://github.com/kobezda/qutebrowser into kobezda-open-editor-all-modes
2016-09-05 10:59:53 +02:00
Ján Kobezda
da65f7234a
Allow :open-editor in modes other than insert
...
':open-editor' can now be run in all modes.
Resolves #1902
2016-09-04 22:23:16 +02:00
Florian Bruhin
ea4f4e197f
Handle elements which are out of view correctly
...
Fixes #1910
2016-09-04 21:09:15 +02:00
Florian Bruhin
faa052ad6f
Fix hang with multiple spaces in URL completion
2016-09-04 20:19:16 +02:00
Florian Bruhin
1e601d3419
Add apikey to test_pastebin.py
2016-09-02 06:10:21 +02:00
Florian Bruhin
6798583e91
Merge branch 'test_yanking' of https://github.com/julianuu/qutebrowser into julianuu-test_yanking
2016-09-01 22:05:21 +02:00
arza
9b6541638e
Update CHANGED_KEY_COMMANDS and test_migrations for sk-keybinding.
2016-09-01 21:05:44 +03:00
Florian Bruhin
654260dd2e
Add blank line
2016-09-01 07:09:06 +02:00
Ryan Roden-Corrent
24a5bffbd8
Test for completion warnings with 1 item.
...
Add a regression test for #1600 : Warnings from completionwidget when it
only has 1 item.
Addresses #1899 .
2016-08-31 22:25:34 -04:00
Ryan Roden-Corrent
48fe309a48
Regression test for repeated completion.
...
Add a completionwidget unit test for #1812 : help completion repeatedly
completes.
Addresses #1899 .
2016-08-31 22:16:26 -04:00
Julian Weigt
fc3c93d3dd
run test for clipboard also if selection is not supported
2016-08-30 11:30:32 +02:00
Florian Bruhin
b9282587d0
Merge branch 'auto-open-fixes' of https://github.com/mlochbaum/qutebrowser into mlochbaum-auto-open-fixes
2016-08-29 07:12:14 +02:00
Florian Bruhin
1c0cbc3269
Improve qute:settings tests
2016-08-29 07:09:14 +02:00
Florian Bruhin
5917f34eab
Merge branch 'settings' of https://github.com/lahwaacz/qutebrowser into lahwaacz-settings
2016-08-29 06:52:17 +02:00
Jakub Klinkovský
b272fce2cf
fix test for setting an invalid value via qute://settings
2016-08-26 15:33:35 +02:00
Jakub Klinkovský
9ff945c56f
add tests for qute://settings
2016-08-26 14:51:40 +02:00
Florian Bruhin
187bfa8fce
tests: Use pytest_register_assert_rewrite
2016-08-26 06:22:03 +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
8823ed2821
Improve cmdutils tests
...
This would have caught 12061b8bb1
.
2016-08-25 22:16:25 +02:00
Florian Bruhin
943dc564b2
Fix choices validation with unannotated args
...
Something like:
@cmdutils.argument('foo', choices=['one', 'two'])
def func(foo):
# ...
didn't actually validate the foo argument, since the inferred type of
the argument is None, and that skipped all conversion (and thus
validation).
Fixes #1871
See #1885
This is a reworked version of 12061b8bb1
which lets special parameters (count/win_id/flags) through correctly.
2016-08-25 22:16:25 +02:00
Julian Weigt
853e75e3db
Split test for yanking
2016-08-25 13:41:47 +02:00
Julian Weigt
193d219eaf
Added test for yanking
2016-08-24 17:39:52 +02:00
Florian Bruhin
6b4f719897
Revert "tests: Add a autouse fixture as workaround"
...
This reverts commit 853f4cd9d8
.
2016-08-24 07:23:00 +02:00
Florian Bruhin
445d287955
Revert "Fix choices validation with unannotated args"
...
This reverts commit 12061b8bb1
.
2016-08-23 23:34:02 +02:00
Florian Bruhin
8c9bf96435
Merge branch 'test_no_dict' of https://github.com/julianuu/qutebrowser into julianuu-test_no_dict
2016-08-23 23:08:51 +02:00
Florian Bruhin
12061b8bb1
Fix choices validation with unannotated args
...
Something like:
@cmdutils.argument('foo', choices=['one', 'two'])
def func(foo):
# ...
didn't actually validate the foo argument, since the inferred type of
the argument is None, and that skipped all conversion (and thus
validation).
Fixes #1871
See #1885
2016-08-23 22:01:21 +02:00
Florian Bruhin
64a61ce07f
Merge branch 'pytest30'
2016-08-23 09:03:24 +02:00
Florian Bruhin
a17b8bec90
Don't treat "Hello." as URL with auto-search=naive
2016-08-23 09:02:39 +02:00
Florian Bruhin
f45c4d73f4
Split test_is_url into three separate tests
2016-08-23 08:07:45 +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
0c6574afb1
Replace py.test with pytest
...
See #1877
2016-08-22 07:41:10 +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
4658bdcacf
Use pytest.approx in tests.helpers.utils
...
See #1877
2016-08-22 07:39:11 +02:00
Florian Bruhin
853f4cd9d8
tests: Add a autouse fixture as workaround
...
This is a workaround for
https://github.com/pytest-dev/pytest/issues/1832
2016-08-22 07:24:17 +02:00
Florian Bruhin
80a3920aad
Revert "Revert "tests: Use getfixturevalue""
...
This reverts commit c8fe21c85f
.
2016-08-22 07:24:17 +02:00
Marshall Lochbaum
994c6e35d9
Test completion show when calling next with no completion
2016-08-21 23:05:56 -04:00
Marshall Lochbaum
fb9867b6a7
Add tests for completion show with no rows
2016-08-21 22:57:16 -04:00
Marshall Lochbaum
cbecd48871
Refactor Completer/CompletionView interface, removing set_pattern()
2016-08-21 22:56:18 -04:00
Julian Weigt
be89e8f499
Add check that qutebrowser defaults to letter hints
2016-08-21 19:37:30 +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
Julian Weigt
f98ba7ba0e
Added test for empty dictionary
2016-08-21 15:33:55 +02:00
Florian Bruhin
618a9cbc57
Fix lint
2016-08-20 22:57:09 +02:00
Florian Bruhin
bd53d4a410
tests: Clean up test_utils
2016-08-20 22:39:53 +02:00
Florian Bruhin
5bdeacd772
tests: Clean up test_config
2016-08-20 22:26:32 +02:00
Florian Bruhin
cfbd02eaba
tests: Clean up test_column_widths
2016-08-20 22:08:07 +02:00
Florian Bruhin
4c2b64b573
tests: Clean up test_http
2016-08-20 22:07:12 +02:00
Florian Bruhin
794bdf54a3
tests: Clean up test_log
2016-08-20 21:57:52 +02:00
Marshall Lochbaum
e4cec43cf4
Add quick-complete to completion widget tests
2016-08-20 01:27:39 -04:00
Marshall Lochbaum
2db0ec8b6d
Fix test_completion_show name and docstring
2016-08-20 01:13:32 -04:00
Marshall Lochbaum
64d53e4cf9
Add unit test for completion show
2016-08-20 01:01:38 -04:00
Marshall Lochbaum
08b348be50
Merge branch 'master' into auto-open-fixes
2016-08-19 22:50:26 -04:00
Florian Bruhin
679165ebab
Remove unneeded import
2016-08-19 19:02:12 +02:00
Florian Bruhin
99c2f8eca5
Add missing import
2016-08-19 19:02:02 +02:00
Florian Bruhin
dec0f0753d
Relax the checking in :view-source test
2016-08-19 17:22:07 +02:00
Florian Bruhin
003952748b
Turn on BDD tests for pytest 3.0 again
...
pytest-bdd is fixed in the respective PR
2016-08-19 17:17:08 +02:00
Florian Bruhin
1cfadbf034
Fix / ? : bindings
...
This was broken in #1859 and I didn't notice...
2016-08-19 15:35:20 +02:00
Florian Bruhin
5367434a13
Add a unit test for :debug-log-filter
2016-08-19 15:20:08 +02:00
Florian Bruhin
3b897d6a64
bdd: Move :debug-log-* near :log-capacity tests
2016-08-19 15:05:45 +02:00
Florian Bruhin
6781f6409b
bdd: Test :debug-log-capacity with negative value
2016-08-19 15:05:20 +02:00
Florian Bruhin
33e71525ed
bdd: Test :debug-log-filter with invalid filter
2016-08-19 15:04:11 +02:00
Florian Bruhin
75c3b1a9f8
Fix test for :debug-log-level with invalid level
...
Since we're getting dictionary keys in choices=..., we need to sort them
so we get a consistent message.
2016-08-19 14:57:21 +02:00
Florian Bruhin
37758131f5
Delete broken :debug-log-{filter,level} tests
2016-08-19 14:43:42 +02:00
knaggita
bd6f4ae7c0
Add end2end tests issue52
2016-08-19 14:21:06 +02:00
knaggita
1d5a3a6175
Add :debug-loglevel :debug-logfilter commands
2016-08-19 14:12:19 +02:00
Florian Bruhin
8eb8039370
Merge branch 'rewrite-pP' of https://github.com/blyxxyz/qutebrowser into blyxxyz-rewrite-pP
2016-08-19 13:36:33 +02:00
Florian Bruhin
b5444338ba
Fix lint
2016-08-19 13:35:39 +02:00
Florian Bruhin
f7a7e82939
bdd: Skip another flaky backforward test with qtwe
2016-08-19 13:15:45 +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
8378e16139
Fix ignored tag in misc.feature
...
Seems like pytest-bdd ignores that second tag...
2016-08-19 12:20:23 +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
3d1859b13e
Fix lint
2016-08-19 00:05:56 +02:00
Florian Bruhin
a88adcca17
bdd: Stop checking requests in yankpaste.feature
...
It's not needed and only makes the test more unreliable (e.g. flaky with
QtWebEngine)
2016-08-18 23:58:33 +02:00
Florian Bruhin
044b3df872
bdd: Skip another flaky test for QtWebEngine
2016-08-18 23:47:27 +02:00
Florian Bruhin
fa0bde631d
bdd: at_top is actually implemented (scroll)
2016-08-18 23:47:09 +02:00
Florian Bruhin
ea0f137fd1
bdd: Tag flaky backforward test qtwebengine_skip
2016-08-18 23:33:56 +02:00
Florian Bruhin
44c74c0887
tests: Mark test_mhtml_e2e as qtwebengine_todo
2016-08-18 23:32:26 +02:00
Florian Bruhin
914ce85780
tests: Fix quteproc_new fixture
2016-08-18 23:31:18 +02:00
Florian Bruhin
33755b09df
Skip :insert-text in test_insert_mode in webengine
2016-08-18 23:30:35 +02:00
Florian Bruhin
4d1ae999c6
tests: Allow to mark files as qtwebengine_todo
2016-08-18 23:28:37 +02:00
Florian Bruhin
322a4323cb
Improve file validating in test_hints
2016-08-18 23:28:27 +02:00
Florian Bruhin
1eb0eabdab
test_hints_html: Split off _parse_file
2016-08-18 23:14:21 +02:00
Florian Bruhin
63cc73d56d
Try to make test_hints work with QtWebEngine
2016-08-18 23:10:37 +02:00
Florian Bruhin
94e3d7b050
Mark test_dirbrowser as qtwebengine_skip
2016-08-18 23:05:31 +02:00
Florian Bruhin
339ac42623
bdd: Mark :insert-text tests as @qtwebengine_todo
2016-08-18 23:04:03 +02:00
Florian Bruhin
d2f69db0ff
bdd: Mark qute:bookmarks tests as qtwebengine_todo
2016-08-18 23:00:10 +02:00
Florian Bruhin
63628d2f97
bdd: Wait for any focus object in tabs.feature
...
With QtWebEngine, we get a "Focus object changed" logged pointing to the
QOpenGLWidget, not the tab.
2016-08-18 22:57:21 +02:00
Florian Bruhin
50031c5aae
bdd: xfail in check_open_tabs for QtWebEngine
2016-08-18 22:54:41 +02:00
Florian Bruhin
15f142880e
bdd: Mark qute:settings test as @qtwebengine_todo
2016-08-18 22:52:36 +02:00
Florian Bruhin
1763f9bb58
bdd: Mark search/sessions as qtwebengine_todo
2016-08-18 22:50:57 +02:00
Florian Bruhin
2969d3dc91
bdd: Mark prompt.feature as TODO on QtWebEngine
2016-08-18 22:47:11 +02:00
Florian Bruhin
84b8ea856d
bdd: Skip :scroll-page+navigate tests on webengine
2016-08-18 22:46:48 +02:00
Florian Bruhin
8da942ddc7
bdd: Skip tests on WebEngine causing memory leaks
2016-08-18 22:46:32 +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
d5131aa0a4
navigate.feature: Add @qtwebengine_todo
2016-08-18 22:23:11 +02:00
Florian Bruhin
69514df126
hints.feature: Skip flaky test on QtWebEngine
2016-08-18 22:22:56 +02:00
Florian Bruhin
0557fea79e
Use QApplication.sendEvent instead of postEvent
...
From the QApplication.postEvent docs:
http://doc.qt.io/qt-5/qcoreapplication.html#postEvent
The event must be allocated on the heap since the post event queue
will take ownership of the event and delete it once it has been
posted. It is not safe to access the event after it has been posted.
We can't reliably guarantee that from Python, so we need to use
sendEvent instead.
2016-08-18 21:36:43 +02:00
Florian Bruhin
25faa04196
bdd: Add qtwebengine tags in misc.feature
2016-08-18 20:34:03 +02:00
Florian Bruhin
ec59bfb584
bdd: Handle @qtwebengine_skip tag
2016-08-18 20:33:53 +02:00
Florian Bruhin
788eebc1ad
bdd: Ignore "Running without the SUID sandbox!"
2016-08-18 19:29:34 +02:00
Florian Bruhin
577f1b850a
bdd: Make :jseval tests work with QtWebEngine
2016-08-18 19:26:50 +02:00
Florian Bruhin
d298787b1a
bdd: Make marks.feature work with QtWebEngine
2016-08-18 19:22:18 +02:00
Florian Bruhin
105c1952a8
bdd: Skip scroll checks with QtWebEngine
2016-08-18 19:20:48 +02:00
Jan Verbeek
b6c96855c8
Rewrite paste -s/pP
2016-08-18 19:05:35 +02:00
Florian Bruhin
2cbaf0ccb3
Add @qtwebengine_todo in javascript.feature
2016-08-18 18:44:07 +02:00
Florian Bruhin
e477b810bd
bdd: Mark backforwards test as qtwebengine_todo
2016-08-18 18:29:10 +02:00
Florian Bruhin
0c50e7dfb9
WebEngine: Don't bother running downloads.feature
2016-08-18 18:28:41 +02:00
Florian Bruhin
f03cd5022e
pylint doesn't know pytest.xfail
2016-08-18 18:27:24 +02:00
Florian Bruhin
ab4e442602
QtWebEngine: Don't bother running caret.feature
2016-08-18 18:26:31 +02:00
Florian Bruhin
001e839ca9
Remove qtwebengine_todo for backforward.feature
2016-08-18 18:22:44 +02:00
Florian Bruhin
2d97ffa323
bdd: xfail in compare_session with WebEngine
2016-08-18 18:20:25 +02:00
Florian Bruhin
e950b09027
tests: Get history.feature to work with WebEngine
2016-08-18 18:17:01 +02:00
Florian Bruhin
8d381aaa01
tests: Improve @qtwebengine_* markers
...
This uses xfail for @qtwebengine_todo and adds a new @qtwebengine_skip
marker.
2016-08-18 18:16:33 +02:00
Florian Bruhin
4b7a3db0eb
tests: QtWebEngine: Make hints.feature work
2016-08-18 17:50:52 +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
5e8254d470
bdd: Mark some hint tests as @qtwebengine_todo
2016-08-18 17:43:50 +02:00
Florian Bruhin
3dccd15663
bdd: Handle @qtwebengine_todo tags
2016-08-18 17:41:34 +02:00
Florian Bruhin
745614e45d
BDD: Wait until hints are ready after hinting
...
With QtWebEngine, hinting happens async, so we need to wait for
"hints: ..." in the log before we can actually follow a hint.
2016-08-18 17:21:50 +02:00
Florian Bruhin
d7110069bb
Fix broken :repeat-command test
2016-08-18 16:58:56 +02:00
Florian Bruhin
a06dcc7f0b
BDD: Use :click-element instead of hints
2016-08-18 16:25:58 +02:00