Add some more :paste-primary tests.

This commit is contained in:
Florian Bruhin 2016-01-31 22:08:46 +01:00
parent 701cdc7f76
commit d50e1be566
2 changed files with 20 additions and 0 deletions

View File

@ -6,5 +6,6 @@
</head>
<body>
<textarea id="qute-textarea"></textarea>
<textarea id="qute-textarea-noedit" readonly></textarea>
</body>
</html>

View File

@ -215,3 +215,22 @@ Feature: Yanking and pasting.
And I run :paste-primary
# Compare
Then the text field should contain "This text should stay"
Scenario: Pasting the primary selection without a focused field
When selection is supported
And I open data/paste_primary.html
And I put "test" into the primary selection
And I run :enter-mode insert
And I run :paste-primary
Then the error "No element focused!" should be shown
Scenario: Pasting the primary selection with a read-only field
When selection is supported
And I open data/paste_primary.html
# Click the text field
And I run :hint all
And I run :follow-hint s
And I put "test" into the primary selection
And I run :enter-mode insert
And I run :paste-primary
Then the error "Focused element is not editable!" should be shown