Commit Graph

53 Commits

Author SHA1 Message Date
Kevin Velghe
f4f926cdca Add integration tests for current target hints 2016-03-30 19:49:25 +02: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
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
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
74e168c339 Update Pygments test file. 2016-02-15 07:47:29 +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
d50e1be566 Add some more :paste-primary tests. 2016-01-31 22:08:46 +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ý
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
3c625790cc Don't crash if JS tab is closed twice.
Fixes #906.
2016-01-20 21:24:51 +01:00
Florian Bruhin
9394f13a08 tests: Update hello.txt.html for pygments 2.1. 2016-01-18 08:11:38 +01:00
Florian Bruhin
23107a242b bdd: Ignore POSITION_UNAVAILABLE for geolocation. 2016-01-14 20:40:46 +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
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
adbdfcbad3 tests: Add an SSL server subprocess. 2016-01-12 22:48:38 +01:00
Florian Bruhin
046194ad6f bdd: Add first tests for JS prompt/confirm/alert. 2016-01-12 08:04:56 +01:00
Florian Bruhin
20610807c1 tests: Add missing files. 2016-01-10 22:08:52 +01:00
Florian Bruhin
df6d9d741f bdd: Add search tests for known bugs/regressions.
This adds a test for #874, #507 and #940.
2016-01-07 19:41:26 +01:00
Florian Bruhin
37022b8c45 bdd: Improve search tests. 2016-01-07 08:21:18 +01:00
Florian Bruhin
f9645e447a bdd: Add first tests for searching. 2016-01-07 07:49:45 +01:00
Florian Bruhin
a2c3f8c402 bdd: Add some tests for :follow-selected. 2016-01-06 22:59:42 +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
Daniel Schadt
6d02ef68ec Add BDD tests for pdfjs integration 2015-12-20 20:00:56 +01:00
Florian Bruhin
b4a630563f bdd: Add tests for caret mode. 2015-11-26 23:42:43 +01:00
Florian Bruhin
3bcc80048d bdd: Move yankpaste.html to title.html. 2015-11-26 18:37:33 +01:00
Florian Bruhin
816d62bca5 bdd: Reorganize numbered test files. 2015-11-25 18:02:14 +01:00
Florian Bruhin
21a1f9ca65 bdd: Add various key input tests. 2015-11-25 17:20:53 +01:00
Florian Bruhin
027a10c04b bdd: Add some tests for :navigate. 2015-11-24 21:32:45 +01:00
Florian Bruhin
28b739b9b5 bdd: Add tests for :open. 2015-11-24 19:19:23 +01:00
Florian Bruhin
2ef2e3088f bdd: Add tests for :view-source. 2015-11-24 18:24:33 +01:00
Florian Bruhin
16e1a65448 Merge branch 'download-page' of https://github.com/Kingdread/qutebrowser into Kingdread-download-page 2015-11-23 13:16:16 +01:00
Florian Bruhin
af875f4b8f Add a :fake-key command.
Closes #556.
See #551.
2015-11-20 19:06:06 +01:00
Daniel Schadt
a991a8c43c Don't compare requests triggered by loading a page 2015-11-20 13:42:32 +01:00
Daniel Schadt
3438a45b19 Merge branch 'master' into download-page 2015-11-18 19:27:26 +01:00
Daniel Schadt
0d6d276592 mhtml: remove non-existing ftp asset
This could be the cause of failing tests, depending on the OS.
2015-11-18 19:15:18 +01:00
Florian Bruhin
779df4c08e bdd: Use separate files for scroll navigate tests.
hello.txt was already cached from some other tests, so let's make sure a fresh
file gets loaded.
2015-11-17 06:40:23 +01:00
Florian Bruhin
eef760359c Add missing 3.txt. 2015-11-16 07:17:53 +01:00
Florian Bruhin
29a1620e81 bdd: Add tests for :scroll-page with --*-navigate. 2015-11-15 17:50:26 +01:00
Florian Bruhin
ce66d731f2 tests: Add missing file. 2015-11-13 06:24:53 +01:00
Daniel Schadt
4210d7e15d mhtml: use png instead of ico for test
Seems like httpbin sends a different MIME-type on travis than on my
laptop, something 'clear' like image/png should fix this.
2015-11-12 21:58:33 +01:00
Daniel Schadt
354259777a mhtml: don't test with dynamically modified page 2015-11-12 21:07:14 +01:00
Daniel Schadt
69a92af097 mhtml: add "complex" test case
The html page is very ugly, but tests the downloader pretty throughout
2015-11-12 20:57:38 +01:00
Florian Bruhin
6bd45bbf24 tests: Add some code for MHTML integration tests. 2015-11-11 09:01:05 +01:00
Florian Bruhin
dce44f2dc5 bdd: Add some first tests for hints. 2015-11-09 18:20:23 +01:00
Florian Bruhin
0daf5885be Add some BDD tests for downloads. 2015-11-09 07:49:11 +01:00
Florian Bruhin
2c7b0d2fb4 Add some bdd tests for scrolling. 2015-11-03 22:42:25 +01:00
Florian Bruhin
d992390cbe bdd: Move yankpaste/test.html to yankpaste.html. 2015-11-03 14:40:30 +01:00