2013-03-24 14:31:14 -04:00
|
|
|
Feature: Project Snippets
|
|
|
|
Background:
|
|
|
|
Given I sign in as a user
|
|
|
|
And I own project "Shop"
|
|
|
|
And project "Shop" have "Snippet one" snippet
|
|
|
|
And project "Shop" have no "Snippet two" snippet
|
|
|
|
And I visit project "Shop" snippets page
|
|
|
|
|
|
|
|
Scenario: I should see snippets
|
|
|
|
Given I visit project "Shop" snippets page
|
|
|
|
Then I should see "Snippet one" in snippets
|
|
|
|
And I should not see "Snippet two" in snippets
|
|
|
|
|
2017-04-13 12:47:28 -04:00
|
|
|
@javascript
|
2013-03-24 14:31:14 -04:00
|
|
|
Scenario: I create new project snippet
|
2016-09-16 05:37:19 -04:00
|
|
|
Given I click link "New snippet"
|
2013-03-24 14:31:14 -04:00
|
|
|
And I submit new snippet "Snippet three"
|
|
|
|
Then I should see snippet "Snippet three"
|
|
|
|
|
|
|
|
@javascript
|
|
|
|
Scenario: I comment on a snippet "Snippet one"
|
|
|
|
Given I visit snippet page "Snippet one"
|
|
|
|
And I leave a comment like "Good snippet!"
|
|
|
|
Then I should see comment "Good snippet!"
|
|
|
|
|
|
|
|
Scenario: I update "Snippet one"
|
|
|
|
Given I visit snippet page "Snippet one"
|
|
|
|
And I click link "Edit"
|
|
|
|
And I submit new title "Snippet new title"
|
|
|
|
Then I should see "Snippet new title"
|
|
|
|
|
|
|
|
Scenario: I destroy "Snippet one"
|
|
|
|
Given I visit snippet page "Snippet one"
|
2015-10-15 02:01:17 -04:00
|
|
|
And I click link "Delete"
|
2013-03-24 14:31:14 -04:00
|
|
|
Then I should not see "Snippet one" in snippets
|