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

contact_messages.feature 1.0KB

1234567891011121314151617181920212223242526
  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. Scenario: Send Contact Message as a user
  15. Given I am logged in as user
  16. And I go to the homepage
  17. When I go to the contact page
  18. Then the page should have a "form" called "new_contact_message"
  19. And the page should not have a "input" called "contact_message_email"
  20. And I fill in "contact_message_title" with "Hello Webmaster"
  21. And I fill in "contact_message_content" with "How are you doing bro?"
  22. And I click in the button "submit_contact_message"
  23. Then I should see "Message sent!"