Don't allow to set hints.selectors in autoconfig.yml
Also, set all settings temporarily for end2end tests. This allows us to set things which aren't settable in autoconfig.yml.
This commit is contained in:
parent
0423ec6f91
commit
f36285658e
@ -2581,6 +2581,8 @@ CSS selectors used to determine which elements on a page should have hints.
|
||||
|
||||
This setting supports URL patterns.
|
||||
|
||||
This setting can only be set in config.py.
|
||||
|
||||
Type: <<types,Dict>>
|
||||
|
||||
Default:
|
||||
|
@ -1163,6 +1163,7 @@ hints.scatter:
|
||||
Ignored for number hints.
|
||||
|
||||
hints.selectors:
|
||||
no_autoconfig: true
|
||||
default:
|
||||
all:
|
||||
- 'a'
|
||||
|
@ -202,14 +202,14 @@ Feature: Using hints
|
||||
|
||||
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 run :set -tu *://*/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 run :set -tu *://*/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
|
||||
|
||||
|
@ -168,7 +168,7 @@ Feature: Javascript stuff
|
||||
|
||||
Scenario: Per-URL localstorage setting
|
||||
When I set content.local_storage to false
|
||||
And I run :set -u http://localhost:*/data2/* content.local_storage true
|
||||
And I run :set -tu http://localhost:*/data2/* content.local_storage true
|
||||
And I open data/javascript/localstorage.html
|
||||
And I wait for "[*] local storage is not working" in the log
|
||||
And I open data2/javascript/localstorage.html
|
||||
@ -176,7 +176,7 @@ Feature: Javascript stuff
|
||||
|
||||
Scenario: Per-URL JavaScript setting
|
||||
When I set content.javascript.enabled to false
|
||||
And I run :set -u http://localhost:*/data2/* content.javascript.enabled true
|
||||
And I run :set -tu http://localhost:*/data2/* content.javascript.enabled true
|
||||
And I open data2/javascript/enabled.html
|
||||
And I wait for "[*] JavaScript is enabled" in the log
|
||||
And I open data/javascript/enabled.html
|
||||
|
@ -667,7 +667,7 @@ class QuteProc(testprocess.Process):
|
||||
# \ and " in a value should be treated literally, so escape them
|
||||
value = value.replace('\\', r'\\')
|
||||
value = value.replace('"', '\\"')
|
||||
self.send_cmd(':set "{}" "{}"'.format(option, value), escape=False)
|
||||
self.send_cmd(':set -t "{}" "{}"'.format(option, value), escape=False)
|
||||
self.wait_for(category='config', message='Config option changed: *')
|
||||
|
||||
@contextlib.contextmanager
|
||||
|
Loading…
Reference in New Issue
Block a user