diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py index da6451b75..0276e6244 100644 --- a/tests/end2end/features/conftest.py +++ b/tests/end2end/features/conftest.py @@ -558,7 +558,11 @@ def _get_scroll_values(quteproc): @bdd.then(bdd.parsers.re(r"the page should be scrolled " r"(?Phorizontally|vertically)")) -def check_scrolled(quteproc, direction): +def check_scrolled(request, quteproc, direction): + if request.config.getoption('--qute-bdd-webengine'): + # pylint: disable=no-member + pytest.xfail(reason="QtWebEngine TODO: Sessions are not implemented") + # pylint: enable=no-member x, y = _get_scroll_values(quteproc) if direction == 'horizontally': assert x != 0 @@ -569,7 +573,11 @@ def check_scrolled(quteproc, direction): @bdd.then("the page should not be scrolled") -def check_not_scrolled(quteproc): +def check_not_scrolled(request, quteproc): + if request.config.getoption('--qute-bdd-webengine'): + # pylint: disable=no-member + pytest.xfail(reason="QtWebEngine TODO: Sessions are not implemented") + # pylint: enable=no-member x, y = _get_scroll_values(quteproc) assert x == 0 assert y == 0 diff --git a/tests/end2end/features/test_marks_bdd.py b/tests/end2end/features/test_marks_bdd.py index b2777cbe4..01d9aa1ae 100644 --- a/tests/end2end/features/test_marks_bdd.py +++ b/tests/end2end/features/test_marks_bdd.py @@ -17,12 +17,17 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . +import pytest import pytest_bdd as bdd bdd.scenarios('marks.feature') @bdd.then(bdd.parsers.parse("the page should be scrolled to {x} {y}")) -def check_y(quteproc, x, y): +def check_y(request, quteproc, x, y): + if request.config.getoption('--qute-bdd-webengine'): + # pylint: disable=no-member + pytest.xfail(reason="QtWebEngine TODO: Sessions are not implemented") + # pylint: enable=no-member data = quteproc.get_session() pos = data['windows'][0]['tabs'][0]['history'][-1]['scroll-pos'] assert int(x) == pos['x']