Add test for tab-bg focus

This commit is contained in:
Jay Kamat 2018-05-09 15:34:01 -07:00
parent 262cea8e75
commit bc9f178a08
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Simple link and input</title>
<script type="text/javascript">
function setup_event_listener() {
var elem = document.getElementById('qute-input-existing');
console.log(elem);
elem.addEventListener('input', function() {
console.log("contents: " + elem.value);
});
}
</script>
</head>
<body onload="setup_event_listener()">
<a href="/data/hello.txt" id="link">Follow me!</a>
<form><input id="qute-input"></input></form>
With padding:
<form><input type="text" style="padding-left: 20px;"></input></form>
With existing text (logs to JS)::
<form><input id="qute-input-existing" value="existing"></input></form>
</body>
</html>

View File

@ -203,6 +203,17 @@ Feature: Using hints
And I run :fake-key new
Then the javascript message "contents: existingnew" should be logged
Scenario: Typing input with existing text after opening a bg tab
When I open data/hints/link_input.html
And I run :click-element id qute-input-existing
And I wait for "Entering mode KeyMode.insert *" in the log
And I run :leave-mode
And I hint with args "all tab-bg" and follow a
And I wait until data/hello.txt is loaded
And I run :enter-mode insert
And I run :fake-key -g new
Then the javascript message "contents: existingnew" should be logged
### iframes
Scenario: Using :follow-hint inside an iframe
When I open data/hints/iframe.html