bdd: Add some misc. tests.
This commit is contained in:
parent
2fc1612bd4
commit
3fac74656e
28
tests/integration/features/misc.feature
Normal file
28
tests/integration/features/misc.feature
Normal file
@ -0,0 +1,28 @@
|
||||
Feature: Various utility commands.
|
||||
|
||||
Scenario: :set-cmd-text and :command-accept
|
||||
When I run :set-cmd-text :message-info "Hello World"
|
||||
And I run :command-accept
|
||||
Then the message "Hello World" should be shown.
|
||||
|
||||
Scenario: :set-cmd-text with two commands
|
||||
When I run :set-cmd-text :message-info test ;; message-error error
|
||||
And I run :command-accept
|
||||
Then the message "test" should be shown.
|
||||
And the error "error" should be shown.
|
||||
|
||||
Scenario: :set-cmd-text with invalid command
|
||||
When I run :set-cmd-text foo
|
||||
Then the error "Invalid command text 'foo'." should be shown.
|
||||
|
||||
Scenario: :message-error
|
||||
When I run :message-error "Hello World"
|
||||
Then the error "Hello World" should be shown.
|
||||
|
||||
Scenario: :message-info
|
||||
When I run :message-info "Hello World"
|
||||
Then the message "Hello World" should be shown.
|
||||
|
||||
Scenario: :message-warning
|
||||
When I run :message-warning "Hello World"
|
||||
Then the warning "Hello World" should be shown.
|
21
tests/integration/features/test_misc.py
Normal file
21
tests/integration/features/test_misc.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('misc.feature')
|
Loading…
Reference in New Issue
Block a user