Commit 0efa7f897950a79d61e238b7591259d9400c28f2

Authored by Daniel
1 parent a5c0c0f3

social_network: Added scenarios for AI3096

Added scenarios for joining communities on signup and login.

(ActionItem3096)

Signed-off-by: Daniel Bucher <daniel.bucher88@gmail.com>
Signed-off-by: Luiz Matos <luizff.matos@gmail.com>
Showing 2 changed files with 63 additions and 0 deletions   Show diff stats
features/login.feature
... ... @@ -207,3 +207,18 @@ Feature: login
207 207 | Password | 123456 |
208 208 When I press "Log in"
209 209 Then I should be on joaosilva's control panel
  210 +
  211 + Scenario: join community on login
  212 + Given the following users
  213 + | login | name |
  214 + | mariasilva | Maria Silva |
  215 + And the following communities
  216 + | name | identifier | owner |
  217 + | Free Software | freesoftware | mariasilva |
  218 + And I am on /freesoftware
  219 + When I follow "Join"
  220 + And I fill in the following:
  221 + | Username / Email | joaosilva |
  222 + | Password | 123456 |
  223 + And I press "Log in"
  224 + Then "Joao Silva" should be a member of "Free Software"
... ...
features/signup.feature
... ... @@ -250,3 +250,51 @@ Feature: signup
250 250 And I fill in "Password" with "secret"
251 251 And I press "Log in"
252 252 Then I should be on the homepage
  253 +
  254 + @selenium
  255 + Scenario: join community on signup
  256 + Given the following users
  257 + | login | name |
  258 + | mariasilva | Maria Silva |
  259 + And the following communities
  260 + | name | identifier | owner |
  261 + | Free Software | freesoftware | mariasilva |
  262 + And feature "skip_new_user_email_confirmation" is disabled on environment
  263 + And I am on /freesoftware
  264 + When I follow "Join"
  265 + And I follow "New user"
  266 + And I fill in the following within ".no-boxes":
  267 + | e-Mail | josesilva@example.com |
  268 + | Username | josesilva |
  269 + | Password | secret |
  270 + | Password confirmation | secret |
  271 + | Full name | José da Silva |
  272 + And wait for the captcha signup time
  273 + And I press "Create my account"
  274 + And I go to josesilva's confirmation URL
  275 + And I fill in "Username" with "josesilva"
  276 + And I fill in "Password" with "secret"
  277 + And I press "Log in"
  278 + Then "Joao Silva" should be a member of "Free Software"
  279 +
  280 + @selenium
  281 + Scenario: join community on direct signup
  282 + Given the following users
  283 + | login | name |
  284 + | mariasilva | Maria Silva |
  285 + And the following communities
  286 + | name | identifier | owner |
  287 + | Free Software | freesoftware | mariasilva |
  288 + And feature "skip_new_user_email_confirmation" is enabled on environment
  289 + And I am on /freesoftware
  290 + When I follow "Join"
  291 + And I follow "New user"
  292 + And I fill in the following within ".no-boxes":
  293 + | e-Mail | josesilva@example.com |
  294 + | Username | josesilva |
  295 + | Password | secret |
  296 + | Password confirmation | secret |
  297 + | Full name | José da Silva |
  298 + And wait for the captcha signup time
  299 + And I press "Create my account"
  300 + Then "Joao Silva" should be a member of "Free Software"
... ...