Permalink
Browse files

Try to make test_hints work with QtWebEngine

  • Loading branch information...
The-Compiler committed Aug 18, 2016
1 parent 94e3d7b commit 63cc73d56dd7a3ad6d83866ba47f6f1e8bdeebd0
Showing with 14 additions and 5 deletions.
  1. +14 −5 tests/end2end/test_hints_html.py
@@ -40,7 +40,13 @@ def collect_tests():
@pytest.mark.parametrize('zoom_level', [100, 66, 33])
@pytest.mark.parametrize('find_implementation', ['javascript', 'python'])
def test_hints(test_name, zoom_text_only, zoom_level, find_implementation,
- quteproc):
+ quteproc, request):
+ if zoom_text_only and request.config.getoption('--qute-bdd-webengine'):
+ pytest.skip("QtWebEngine doesn't have zoom-text-only")
+ if (find_implementation == 'python' and
+ request.config.getoption('--qute-bdd-webengine')):
+ pytest.skip("QtWebEngine doesn't have a python find implementation")
+
file_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'data', 'hints', 'html', test_name)
url_path = 'data/hints/html/{}'.format(test_name)
@@ -70,8 +76,10 @@ def test_hints(test_name, zoom_text_only, zoom_level, find_implementation,
test_name, ', '.join(set(parsed.keys()))))
# setup
- quteproc.set_setting('ui', 'zoom-text-only', str(zoom_text_only))
- quteproc.set_setting('hints', 'find-implementation', find_implementation)
+ if not request.config.getoption('--qute-bdd-webengine'):
+ quteproc.set_setting('ui', 'zoom-text-only', str(zoom_text_only))
+ quteproc.set_setting('hints', 'find-implementation',
+ find_implementation)
quteproc.send_cmd(':zoom {}'.format(zoom_level))
# follow hint
quteproc.send_cmd(':hint links normal')
@@ -80,8 +88,9 @@ def test_hints(test_name, zoom_text_only, zoom_level, find_implementation,
quteproc.wait_for_load_finished('data/' + parsed['target'])
# reset
quteproc.send_cmd(':zoom 100')
- quteproc.set_setting('ui', 'zoom-text-only', 'false')
- quteproc.set_setting('hints', 'find-implementation', 'javascript')
+ if not request.config.getoption('--qute-bdd-webengine'):
+ quteproc.set_setting('ui', 'zoom-text-only', 'false')
+ quteproc.set_setting('hints', 'find-implementation', 'javascript')
def test_word_hints_issue1393(quteproc, tmpdir):

0 comments on commit 63cc73d

Please sign in to comment.