Skip to content

Commit

Permalink
post_comment caminho triste
Browse files Browse the repository at this point in the history
  • Loading branch information
natalypatti committed Dec 4, 2019
1 parent 24bc90d commit e83a33e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/features/post_comment.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@ Scenario: student write a comment on the content field and clicks the button "Ma
And I fill the content comment field with some information
And I click the Mandar comentário button icon
Then I should see the view spotted page
And I should see my new comment on the timeline
And I should see my new comment on the timeline

Scenario: student tries to post a comment with empty content
Given I am on the college page
When I click the Ver spotted button
And I dont fill the content comment field
And I click the Mandar comentário button icon
Then I should see the red failed toast
5 changes: 5 additions & 0 deletions src/app/features/step_definitions/post_comment_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
expect(page).to have_xpath('.//div', text: "Comment Teste")
end

When(/^I dont fill the content comment field$/) do
fill_in "comment[content]", with: ""
end

# - - -

Given (/^I posted a comment successfully$/) do
Expand Down Expand Up @@ -43,3 +47,4 @@

@comment = Comment.find_by(content: "Comment Test")
end

0 comments on commit e83a33e

Please sign in to comment.