diff options
author | Andrew8xx8 <avk@8xx8.ru> | 2013-03-25 02:17:38 +0400 |
---|---|---|
committer | Andrew8xx8 <avk@8xx8.ru> | 2013-03-25 02:19:40 +0400 |
commit | 8f08fbfd9f768b885c631bdc8bc8ad202c6827a0 (patch) | |
tree | dfbdebbc19d0de48b42b47e5f1b6435db800d0a5 /features/snippets | |
parent | 4be12be62a9dc30faecff139684f7537f0726d45 (diff) | |
download | gitlab-ce-8f08fbfd9f768b885c631bdc8bc8ad202c6827a0.tar.gz |
Tests for personal snippets added
Diffstat (limited to 'features/snippets')
-rw-r--r-- | features/snippets/discover_snippets.feature | 10 | ||||
-rw-r--r-- | features/snippets/snippets.feature | 28 | ||||
-rw-r--r-- | features/snippets/user_snippets.feature | 22 |
3 files changed, 60 insertions, 0 deletions
diff --git a/features/snippets/discover_snippets.feature b/features/snippets/discover_snippets.feature new file mode 100644 index 00000000000..d6fd2cd7808 --- /dev/null +++ b/features/snippets/discover_snippets.feature @@ -0,0 +1,10 @@ +Feature: Discover Snippets + Background: + Given I sign in as a user + And I have public "Personal snippet one" snippet + And I have private "Personal snippet private" snippet + + Scenario: I should see snippets + Given I visit snippets page + Then I should see "Personal snippet one" in snippets + And I should not see "Personal snippet private" in snippets diff --git a/features/snippets/snippets.feature b/features/snippets/snippets.feature new file mode 100644 index 00000000000..ebb4a7c0719 --- /dev/null +++ b/features/snippets/snippets.feature @@ -0,0 +1,28 @@ +Feature: Snippets + Background: + Given I sign in as a user + And I have public "Personal snippet one" snippet + And I have private "Personal snippet private" snippet + + Scenario: I create new snippet + Given I visit new snippet page + And I submit new snippet "Personal snippet three" + Then I should see snippet "Personal snippet three" + + Scenario: I update "Personal snippet one" + Given I visit snippet page "Personal snippet one" + And I click link "Edit" + And I submit new title "Personal snippet new title" + Then I should see "Personal snippet new title" + + Scenario: Set "Personal snippet one" public + Given I visit snippet page "Personal snippet one" + And I click link "Edit" + And I uncheck "Private" checkbox + Then I should see "Personal snippet one" public + + Scenario: I destroy "Personal snippet one" + Given I visit snippet page "Personal snippet one" + And I click link "Edit" + And I click link "Destroy" + Then I should not see "Personal snippet one" in snippets diff --git a/features/snippets/user_snippets.feature b/features/snippets/user_snippets.feature new file mode 100644 index 00000000000..4c8a91501c4 --- /dev/null +++ b/features/snippets/user_snippets.feature @@ -0,0 +1,22 @@ +Feature: User Snippets + Background: + Given I sign in as a user + And I have public "Personal snippet one" snippet + And I have private "Personal snippet private" snippet + + Scenario: I should see all my snippets + Given I visit my snippets page + Then I should see "Personal snippet one" in snippets + And I should see "Personal snippet private" in snippets + + Scenario: I can see only my private snippets + Given I visit my snippets page + And I click "Private" filter + Then I should not see "Personal snippet one" in snippets + And I should see "Personal snippet private" in snippets + + Scenario: I can see only my public snippets + Given I visit my snippets page + And I click "Public" filter + Then I should see "Personal snippet one" in snippets + And I should not see "Personal snippet private" in snippets |