From 9f5f52360c88fb65542e0f6923a3eddd6220ec45 Mon Sep 17 00:00:00 2001 From: Olmo Kramer Date: Wed, 4 Jul 2018 23:52:28 +0200 Subject: [PATCH] Add test cases for url-patterns --- tests/end2end/data/hints/custom_group.html | 2 -- tests/end2end/features/hints.feature | 22 +++++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/end2end/data/hints/custom_group.html b/tests/end2end/data/hints/custom_group.html index d593b8231..380d10dda 100644 --- a/tests/end2end/data/hints/custom_group.html +++ b/tests/end2end/data/hints/custom_group.html @@ -7,7 +7,5 @@
beep!
-
bop!
-
boop!
diff --git a/tests/end2end/features/hints.feature b/tests/end2end/features/hints.feature index 4372f732c..613101175 100644 --- a/tests/end2end/features/hints.feature +++ b/tests/end2end/features/hints.feature @@ -192,14 +192,22 @@ Feature: Using hints Scenario: Custom hint group When I open data/hints/custom_group.html - And I set hints.selectors to {"custom": [".clickable"]} - And I hint with args "--rapid custom" - And I run :follow-hint a - And I run :follow-hint s - And I run :follow-hint d + And I set hints.selectors to {"custom":[".clickable"]} + And I hint with args "custom" and follow a + Then the javascript message "beep!" should be logged + + Scenario: Custom hint group with URL pattern + When I open data/hints/custom_group.html + And I run :set -u *://*/data/hints/custom_group.html hints.selectors '{"custom": [".clickable"]}' + And I hint with args "custom" and follow a + Then the javascript message "beep!" should be logged + + Scenario: Fallback to global value with URL pattern set + When I open data/hints/custom_group.html + And I set hints.selectors to {"custom":[".clickable"]} + And I run :set -u *://*/data/hints/custom_group.html hints.selectors '{"other": [".other"]}' + And I hint with args "custom" and follow a Then the javascript message "beep!" should be logged - And the javascript message "bop!" should be logged - And the javascript message "boop!" should be logged # https://github.com/qutebrowser/qutebrowser/issues/1613 Scenario: Hinting inputs with padding