From 24a5bffbd81a004dfe9a6c0acfae759d26999c12 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Wed, 31 Aug 2016 22:25:34 -0400 Subject: [PATCH] Test for completion warnings with 1 item. Add a regression test for #1600: Warnings from completionwidget when it only has 1 item. Addresses #1899. --- tests/end2end/features/completion.feature | 7 +++++++ tests/end2end/features/test_completion_bdd.py | 21 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/end2end/features/completion.feature create mode 100644 tests/end2end/features/test_completion_bdd.py diff --git a/tests/end2end/features/completion.feature b/tests/end2end/features/completion.feature new file mode 100644 index 000000000..f3a343585 --- /dev/null +++ b/tests/end2end/features/completion.feature @@ -0,0 +1,7 @@ +Feature: Command bar completion + + Scenario: No warnings when completing with one entry (#1600) + Given I open about:blank + When I run :set-cmd-text -s :open + And I run :completion-item-focus next + Then no crash should happen diff --git a/tests/end2end/features/test_completion_bdd.py b/tests/end2end/features/test_completion_bdd.py new file mode 100644 index 000000000..4c2b43c8f --- /dev/null +++ b/tests/end2end/features/test_completion_bdd.py @@ -0,0 +1,21 @@ +# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: + +# Copyright 2016 Ryan Roden-Corrent (rcorre) +# +# 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('completion.feature')