diff --git a/src/app/features/post_spotted.feature b/src/app/features/post_spotted.feature index c4d4354b..1f4008df 100644 --- a/src/app/features/post_spotted.feature +++ b/src/app/features/post_spotted.feature @@ -14,4 +14,10 @@ Scenario: student write a spotted on the content field and clicks the button "Ma When I fill the content spotted field with some information And I click the Mandar spotted button Then I should see the college page - And I should see my new spotted on the timeline \ No newline at end of file + And I should see my new spotted on the timeline + +Scenario: student tries to post a spotted with empty content + Given I click the Novo spotted button + When I dont fill the content spotted field + And I click the Mandar spotted button + Then I should see the red failed toast \ No newline at end of file diff --git a/src/app/features/step_definitions/post_spotted_steps.rb b/src/app/features/step_definitions/post_spotted_steps.rb index b482013d..ac62da50 100644 --- a/src/app/features/step_definitions/post_spotted_steps.rb +++ b/src/app/features/step_definitions/post_spotted_steps.rb @@ -6,6 +6,10 @@ expect(page).to have_xpath('.//div', text: "Spotted Teste") end +When("I dont fill the content spotted field") do + fill_in "spotted[content]", with: "" +end + # - - - Given (/^I posted a spotted successfully on the college page$/) do