diff --git a/tests/integration/data/hints/link.html b/tests/integration/data/hints/link.html new file mode 100644 index 000000000..ec4f9f38c --- /dev/null +++ b/tests/integration/data/hints/link.html @@ -0,0 +1,10 @@ + + + + + A link to use hints on + + + Follow me! + + diff --git a/tests/integration/features/hints.feature b/tests/integration/features/hints.feature new file mode 100644 index 000000000..4f565650e --- /dev/null +++ b/tests/integration/features/hints.feature @@ -0,0 +1,19 @@ +Feature: Using hints + + Scenario: Following a hint. + When I open data/hints/link.html + And I run :hint links normal + And I run :follow-hint a + Then the requests should be: + data/hints/link.html + data/hello.txt + + Scenario: Using :follow-hint outside of hint mode (issue 1105) + When I run :follow-hint + Then the error "follow-hint: This command is only allowed in hint mode." should be shown. + + Scenario: Using :follow-hint with an invalid index. + When I open data/hints/link.html + And I run :hint links normal + And I run :follow-hint xyz + Then the error "No hint xyz!" should be shown. diff --git a/tests/integration/features/test_hints.py b/tests/integration/features/test_hints.py new file mode 100644 index 000000000..dc3905215 --- /dev/null +++ b/tests/integration/features/test_hints.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('hints.feature')