diff --git a/tests/integration/features/test_zoom.py b/tests/integration/features/test_zoom.py new file mode 100644 index 000000000..92c7f2b6e --- /dev/null +++ b/tests/integration/features/test_zoom.py @@ -0,0 +1,21 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: + +# Copyright 2015 Florian Bruhin (The Compiler) +# +# This file is part of qutebrowser. +# +# qutebrowser is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# qutebrowser is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with qutebrowser. If not, see . + +import pytest_bdd as bdd +bdd.scenarios('zoom.feature') diff --git a/tests/integration/features/zoom.feature b/tests/integration/features/zoom.feature new file mode 100644 index 000000000..3dfca5df2 --- /dev/null +++ b/tests/integration/features/zoom.feature @@ -0,0 +1,45 @@ +Feature: Zooming in and out + + Background: + Given I open data/hello.txt + + Scenario: Zooming in + When I run :zoom-in + Then the message "Zoom level: 110%" should be shown. + And the session should look like: + windows: + - tabs: + - ... + - history: + - zoom: 1.1 + + Scenario: Zooming out + When I run :zoom-out + Then the message "Zoom level: 90%" should be shown. + And the session should look like: + windows: + - tabs: + - ... + - history: + - zoom: 0.9 + + Scenario: Setting zoom + When I run :zoom 50 + Then the message "Zoom level: 50%" should be shown. + And the session should look like: + windows: + - tabs: + - ... + - history: + - zoom: 0.5 + + Scenario: Resetting zoom + When I run :zoom 50 + And I run :zoom + Then the message "Zoom level: 100%" should be shown. + And the session should look like: + windows: + - tabs: + - ... + - history: + - zoom: 1.0