petition.feature 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. @javascript
  2. Feature: Users can sign petitions
  3. Background:
  4. Given A petition exists thats one signature away from its goal
  5. Scenario: Petitions should not show all signatures
  6. When I browse to the action page
  7. Then I should not see "Next" within "#signatures"
  8. And I should not see "Download CSV"
  9. Scenario: New signatures should immediately appear below the petition
  10. When I browse to the action page
  11. And I fill in my name
  12. And I fill in my email
  13. And I fill in my zip code
  14. And I submit the petition
  15. Then I should see "Test User" within "#signatures"
  16. Scenario: A user can sign up for a partner newsletter
  17. Given a partner named "The Watchers Council" with the code "twc" exists
  18. And "The Watchers Council" is a partner on the action
  19. When I browse to the action page with a "The Watchers Council" newsletter signup
  20. And I fill in my name
  21. And I fill in my email
  22. And I fill in my zip code
  23. And I sign up for the newsletter of the partner with code "twc"
  24. And I submit the petition
  25. And there should be a persisted Subscription with:
  26. |first_name|Test|
  27. |last_name|User|
  28. |email|me@example.com|
  29. |partner_id|1|