user_mention.feature 1.37 KB
Feature: user mention
As a user
  I want to mention my friends and community members
  So that they get notified about what I wrote

  Background:
    Given the following users
      | login    |
      | fulano   |
      | ciclano  |
      | deltrano |
    And "ciclano" is friend of "fulano"
    And the following communities
      | identifier     | name           | owner |
      | test-community | test community | fulano |
    And "deltrano" is a member of "test community"
    And the following articles
      | owner           | name              |
      | fulano          | fulano article    |
      | test-community  | community article |
    And I am logged in as "fulano"


  @selenium
  Scenario: mention a friend
    Given I am on /fulano/fulano-article
    And I follow "Post a comment"
    And I fill in "Title" with "Hey ho, let's go!"
    And I type "@cic" into mention textarea "#comment_body" and I choose "ciclano"
    And I should see "@ciclano"
    And I press "Post comment"
    Then I should see "@ciclano"

  @selenium
  Scenario: mention a community member
    Given I am on /test-community/community-article
    And I follow "Post a comment"
    And I fill in "Title" with "Hey ho, let's go!"
    And I type "@del" into mention textarea "#comment_body" and I choose "deltrano"
    And I should see "@deltrano"
    And I press "Post comment"
    Then I should see "@deltrano"