From d50e1be56671bf064b25d2c27a21f4d75c3af194 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 31 Jan 2016 22:08:46 +0100 Subject: [PATCH] Add some more :paste-primary tests. --- tests/integration/data/paste_primary.html | 1 + tests/integration/features/yankpaste.feature | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/tests/integration/data/paste_primary.html b/tests/integration/data/paste_primary.html index ff6e9ed54..4f803aedf 100644 --- a/tests/integration/data/paste_primary.html +++ b/tests/integration/data/paste_primary.html @@ -6,5 +6,6 @@ + diff --git a/tests/integration/features/yankpaste.feature b/tests/integration/features/yankpaste.feature index 99a34c35a..40255b6e5 100644 --- a/tests/integration/features/yankpaste.feature +++ b/tests/integration/features/yankpaste.feature @@ -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