From 394d9d1404e94ea91225d8155c4d292d5ffc2bfa Mon Sep 17 00:00:00 2001 From: Ismail S Date: Fri, 8 Jul 2016 15:54:39 +0100 Subject: [PATCH] Add more tests for :bookmark-add --- tests/end2end/features/urlmarks.feature | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/end2end/features/urlmarks.feature b/tests/end2end/features/urlmarks.feature index 217f4012c..8f0136e59 100644 --- a/tests/end2end/features/urlmarks.feature +++ b/tests/end2end/features/urlmarks.feature @@ -8,6 +8,20 @@ Feature: quickmarks and bookmarks Then the message "Bookmarked http://localhost:*/data/title.html!" should be shown And the bookmark file should contain "http://localhost:*/data/title.html Test title" + Scenario: Saving a bookmark with a provided url and title + When I run :bookmark-add http://example.com "some example title" + Then the message "Bookmarked http://example.com!" should be shown + And the bookmark file should contain "http://example.com some example title" + + Scenario: Saving a bookmark with a url but no title + When I run :bookmark-add http://example.com + Then the error "Title must be provided if url has been provided" should be shown + + Scenario: Saving a bookmark with an invalid url + When I set general -> auto-search to false + And I run :bookmark-add foo! "some example title" + Then the error "Invalid URL" should be shown + Scenario: Saving a duplicate bookmark Given I have a fresh instance When I open data/title.html