blob: 5de89b65bc9528cb1be234ebccdaafb1886862ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
# vim: ft=cucumber fileencoding=utf-8 sts=4 sw=4 et:
Feature: Zooming in and out
Background:
Given I open data/hello.txt
And I set zoom.levels to [50%, 90%, 100%, 110%, 120%]
And I run :tab-only
Scenario: Zooming in
When I run :zoom-in
Then the message "Zoom level: 110%" should be shown
And the zoom should be 110%
Scenario: Zooming out
When I run :zoom-out
Then the message "Zoom level: 90%" should be shown
And the zoom should be 90%
Scenario: Zooming in with count
When I run :zoom-in with count 2
Then the message "Zoom level: 120%" should be shown
And the zoom should be 120%
# https://github.com/qutebrowser/qutebrowser/issues/1118
Scenario: Zooming in with very big count
When I run :zoom-in with count 99999999999
Then the message "Zoom level: 120%" should be shown
And the zoom should be 120%
# https://github.com/qutebrowser/qutebrowser/issues/1118
Scenario: Zooming out with very big count
When I run :zoom-out with count 99999999999
Then the message "Zoom level: 50%" should be shown
And the zoom should be 50%
# https://github.com/qutebrowser/qutebrowser/issues/1118
Scenario: Zooming in with very big count and snapping in
When I run :zoom-in with count 99999999999
And I run :zoom-out
Then the message "Zoom level: 110%" should be shown
And the zoom should be 110%
Scenario: Zooming out with count
When I run :zoom-out with count 2
Then the message "Zoom level: 50%" should be shown
And the zoom should be 50%
Scenario: Setting zoom
When I run :zoom 50
Then the message "Zoom level: 50%" should be shown
And the zoom should be 50%
Scenario: Setting zoom with trailing %
When I run :zoom 50%
Then the message "Zoom level: 50%" should be shown
And the zoom should be 50%
Scenario: Setting zoom with count
When I run :zoom with count 40
Then the message "Zoom level: 40%" should be shown
And the zoom should be 40%
Scenario: Resetting zoom
When I set zoom.default to 42%
And I run :zoom 50
And I run :zoom
Then the message "Zoom level: 42%" should be shown
And the zoom should be 42%
Scenario: Setting zoom to invalid value
When I run :zoom -1
Then the error "Can't zoom -1%!" should be shown
Scenario: Setting zoom with very big count
When I run :zoom with count 99999999999
Then the message "Zoom level: 99999999999%" should be shown
Scenario: Setting zoom with argument and count
When I run :zoom 50 with count 60
Then the message "Zoom level: 60%" should be shown
And the zoom should be 60%
# https://github.com/qutebrowser/qutebrowser/issues/2507
# Using 127.0.0.1 because separate domain is required to reproduce
Scenario: Qutebrowser enforces correct zoom level
When I run :zoom 150%
And I open data/search.html
And I run :open http://127.0.0.1:(port)/data/long_load.html
And I wait until http://127.0.0.1:(port)/data/long_load.html is loaded
And I run :back
And I wait until data/search.html is loaded
Then the zoom should be 150%
# Fixed in QtWebEngine branch
@xfail
Scenario: Zooming in with cloned tab
When I set zoom.default to 100%
And I run :zoom-in
And I wait for "Zoom level: 110%" in the log
And I run :tab-clone
And I wait until data/hello.txt is loaded
And I run :zoom-in
Then the message "Zoom level: 120%" should be shown
And the zoom should be 120%
# https://github.com/qutebrowser/qutebrowser/issues/2183
@qtwebengine_flaky
Scenario: Setting a default zoom
When I set zoom.default to 200%
And I open data/hello.txt in a new tab
And I run :tab-only
Then the zoom should be 200%
Scenario: Zooming in with --quiet
When I run :zoom-in --quiet
Then "Zoom level: *" should not be logged
Scenario: Zooming out with --quiet
When I run :zoom-out --quiet
Then "Zoom level: *" should not be logged
Scenario: Zooming with --quiet
When I run :zoom --quiet
Then "Zoom level: *" should not be logged
|