blob: 68a8373051de7e4e527310ceba0b162859d07bbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# Copyright 2016-2021 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import pytest
import pytest_bdd as bdd
bdd.scenarios('marks.feature')
@pytest.fixture(autouse=True)
def turn_on_scroll_logging(quteproc):
quteproc.turn_on_scroll_logging(no_scroll_filtering=True)
@bdd.then(bdd.parsers.parse("the page should be scrolled to {x} {y}"))
def check_y(request, quteproc, x, y):
data = quteproc.get_session()
pos = data['windows'][0]['tabs'][0]['history'][-1]['scroll-pos']
assert int(x) == pos['x']
assert int(y) == pos['y']
|