Florian Bruhin
111f46adc5
bdd: Increase timeout for should_quit.
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
9c5974c054
bdd: Add a "qutebrowser should quit" step.
2016-01-17 20:59:39 +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
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
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
6c916d166d
Merge branch 'master' of https://github.com/hcraT/qutebrowser into hcraT-master
2016-01-13 18:12:37 +01:00
Florian Bruhin
25dbf3731b
tests: Split wait_for_load_finished from open_path.
2016-01-12 22:47:09 +01:00
Tarcisio Fedrizzi
524341fd7a
Use textwrap.dedent to parse multiline clipboard text
2016-01-12 11:24:31 +01:00
Tarcisio Fedrizzi
f08704e789
Adds function to insert multiple lines in the clipboard
2016-01-12 09:59:03 +01:00
Tarcisio Fedrizzi
1b31a3fee4
Allows to paste multiple URLs
...
- The paste command will now open one tab/window per url if multiple
URLs (separated by newline) are present in the clipboard
- Adds the tests for the new multitab functionality
- Changes test/integration/conftest.py to be able to insert newlines in
the clipboard for the test
2016-01-09 11:32:12 +01:00
Florian Bruhin
4ef0c3e09f
tests: Ensure lines look right when checking tabs.
2016-01-09 00:14:57 +01:00
Florian Bruhin
ab0cd17772
Fix lint.
2016-01-08 10:00:42 +01:00
Florian Bruhin
1fb34331e5
tests: Default to raising=True for qtbot.
...
- qtbot.waitSignal with raising=True is the default this way, so we remove the
raising=True.
- qtbot.waitSignal with raising=False stay untouched
- Some qtbot.waitSignal without raising had one added (because we don't want it
to raise)
- Some qtbot.waitSignal without raising actually should've raised, which they
do now.
2016-01-08 09:49:06 +01:00
Florian Bruhin
eebed7a5a7
tests: Poll clipboard for changes.
...
For some reason I can't explain, since 2b0870084b
we got test failures on OS X, as the clipboard had the old value before waiting
for the change, the new (correct) value after waiting for it, but never
actually emitted 'changed'.
We could just re-check the contents after the timeout, but that'd mean we wait
1s for every test where this weird thing happens.
Instead, we poll the clipboard for every 100ms as long as the timeout (1s)
hasn't passed, and return as soon as it has the correct contents.
2016-01-08 09:35:03 +01:00
Florian Bruhin
eef1604dcd
tests: Improve WaitForClipboardTimeout message.
2016-01-08 08:35:34 +01:00
Florian Bruhin
0d9cbba3b9
tests: Dump contents in WaitForClipboardTimeout.
2016-01-08 01:56:27 +01:00
Florian Bruhin
18b5860584
bdd: Add "When I open ... in a new window" step.
2016-01-07 08:20:48 +01:00
Florian Bruhin
6a592576eb
bdd: Fix timeout exception in _wait_for_clipboard.
2016-01-07 07:43:36 +01:00
Florian Bruhin
16ec035418
bdd: Handle trailing slash for URLs loaded.
...
For some reason, older Qt versions (Debian Jessie/Ubuntu Trusty) like to add a
/, so we need to handle that case too.
2016-01-06 23:19:04 +01:00
Florian Bruhin
7dc03710b1
bdd: Only check logs for "... should be loaded".
...
Checking the requests from the webserver proved problematic, as often there's
some kind of caching going on. Instead, we only check the log, as this is used
for things like :navigate anyways, so if the log says the page got loaded, we
can trust it.
There's still "... should be requested" to check the actual requests.
2016-01-06 22:57:49 +01:00
Florian Bruhin
4099a40e35
Fix lint.
2016-01-06 08:50:22 +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
fc755c104b
bdd: Add test for exception with :pyeval.
2016-01-06 07:42:33 +01:00
Florian Bruhin
e2994e9375
bdd: Add "the page should contain the plaintext".
2016-01-06 07:15:06 +01:00
Florian Bruhin
a5f2ac5f03
Adjust copyright years.
2016-01-04 07:12:39 +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
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
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
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
Artur Shaik
73f999da31
Revert a43c206
and b344f92
.
2015-11-28 21:29:54 +06:00
Florian Bruhin
a43c206893
Mark some caret tests as xfail on Windows/OS X.
...
See #1142 .
2015-11-27 14:39:33 +01:00
Florian Bruhin
e4947b03be
Fix lint.
2015-11-27 11:50:23 +01:00
Florian Bruhin
dbdedf74c0
bdd: Handle \n when checking clipboard contents.
2015-11-26 22:32:01 +01:00
Florian Bruhin
3d291482a3
bdd: Move clipboard functions to conftest.py.
...
Those are needed for caret.feature and yankpaste.feature.
2015-11-26 21:22:50 +01:00
Florian Bruhin
6f1474be71
bdd: Remove trailing dots.
2015-11-26 17:50:39 +01:00
Florian Bruhin
b8467b8fef
tests: Various cleanups.
2015-11-26 14:25:33 +01:00
Florian Bruhin
fac76576d7
bdd: Add "the following tabs should be open" step.
...
This simplifies a lot of .feature files because we don't actually need to check
the full session.
2015-11-26 01:33:56 +01:00
Florian Bruhin
9670ffb78e
bdd: Add "the JS message ... should not be logged".
2015-11-25 17:20:05 +01:00
Florian Bruhin
388cc7ae29
bdd: Add "Then ... should be logged" step.
2015-11-25 17:19:49 +01:00
Florian Bruhin
9fe02d55c9
bdd: Add "I press the keys ..." step.
2015-11-25 17:19:16 +01:00
Florian Bruhin
287b2ba258
bdd: Replace (port) when setting a setting.
2015-11-24 19:19:03 +01:00
Florian Bruhin
d58a5d4d15
bdd: Add "the page source should look like" step.
2015-11-24 18:22:43 +01:00