snippets.feature 1004 Bytes
Newer Older
1
@snippets
2
Feature: Snippets
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
  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 "Destroy"
Valery Sizov's avatar
Valery Sizov committed
28
    Then I should not see "Personal snippet one" in snippets