Add test cases for url-patterns

This commit is contained in:
Olmo Kramer 2018-07-04 23:52:28 +02:00
parent 332cbf811b
commit 9f5f52360c
No known key found for this signature in database
GPG Key ID: BE09591F4AB66337
2 changed files with 15 additions and 9 deletions

View File

@ -7,7 +7,5 @@
</head> </head>
<body> <body>
<div class="clickable" onclick="console.log('beep!')">beep!</div> <div class="clickable" onclick="console.log('beep!')">beep!</div>
<div class="clickable" onclick="console.log('bop!')">bop!</div>
<div class="clickable" onclick="console.log('boop!')">boop!</div>
</body> </body>
</html> </html>

View File

@ -192,14 +192,22 @@ Feature: Using hints
Scenario: Custom hint group Scenario: Custom hint group
When I open data/hints/custom_group.html When I open data/hints/custom_group.html
And I set hints.selectors to {"custom": [".clickable"]} And I set hints.selectors to {"custom":[".clickable"]}
And I hint with args "--rapid custom" And I hint with args "custom" and follow a
And I run :follow-hint a Then the javascript message "beep!" should be logged
And I run :follow-hint s
And I run :follow-hint d 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 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 # https://github.com/qutebrowser/qutebrowser/issues/1613
Scenario: Hinting inputs with padding Scenario: Hinting inputs with padding