A website template with lots of features, built with ruby on rails.

contact_messages.feature 1.0KB

123456789101112131415161718192021222324252627
  1. Feature: Contact Messages
  2. In order to send a message
  3. As an visitor
  4. I want to send contact messages
  5. Scenario: Send Contact Message as a visitor
  6. Given I go to the homepage
  7. When I go to the contact page
  8. Then the page should have a "form" called "new_contact_message"
  9. And I fill in "contact_message_email" with "yo@website.com"
  10. And I fill in "contact_message_title" with "Hello Webmaster"
  11. And I fill in "contact_message_content" with "How are you doing bro?"
  12. And I click in the button "submit_contact_message"
  13. Then I should see "Message sent!"
  14. @focus
  15. Scenario: Send Contact Message as a user
  16. Given I am logged in as user
  17. And I go to the homepage
  18. When I go to the contact page
  19. Then the page should have a "form" called "new_contact_message"
  20. And the page should not have a "input" called "contact_message_email"
  21. And I fill in "contact_message_title" with "Hello Webmaster"
  22. And I fill in "contact_message_content" with "How are you doing bro?"
  23. And I click in the button "submit_contact_message"
  24. Then I should see "Message sent!"