Add some bdd tests for zooming.
This commit is contained in:
parent
3155e20999
commit
7da0d2b6d5
21
tests/integration/features/test_zoom.py
Normal file
21
tests/integration/features/test_zoom.py
Normal file
@ -0,0 +1,21 @@
|
||||
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
|
||||
|
||||
# Copyright 2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
import pytest_bdd as bdd
|
||||
bdd.scenarios('zoom.feature')
|
45
tests/integration/features/zoom.feature
Normal file
45
tests/integration/features/zoom.feature
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user