follows_tags.feature 1.44 KB
Newer Older
danielgrippi's avatar
danielgrippi committed
1 2
@javascript
Feature: posting
3
  In order to take over humanity for the good of society
danielgrippi's avatar
danielgrippi committed
4 5 6 7
  As a rock star
  I want to see what humanity is saying about particular tags

  Background:
8 9 10 11
    Given following users exist:
      | username   | 
      | bob        |
      | alice      |
12

13
    When I sign in as "bob@bob.bob"
Maxwell Salzberg's avatar
Maxwell Salzberg committed
14
    And I post a status with the text "I am da #boss"
15
    When I go to the destroy user session page
danielgrippi's avatar
danielgrippi committed
16
    And I sign in as "alice@alice.alice"
17 18 19
    And I search for "#boss"
    And I press "Follow #boss"
    And I wait for the ajax to finish
danielgrippi's avatar
danielgrippi committed
20

21 22 23 24 25 26
  Scenario: can post a message from the tag page
    Then I should see "#boss" within "#publisher"
    And I post a status with the text "#boss from the tag page"
    And I search for "#boss"
    Then I should see "#boss from the tag page"

27 28 29
  Scenario: see a tag that I am following
    When I go to the home page
    And I follow "#boss"
30
    Then I should see "I am da #boss" within "body"
danielgrippi's avatar
danielgrippi committed
31

32
  Scenario: can stop following a tag from the tag page
danielgrippi's avatar
danielgrippi committed
33
    When I press "Following #boss"
34
    And I go to the followed tags stream page
35
    Then I should not see "#boss" within ".left_nav"
danielgrippi's avatar
danielgrippi committed
36

37
  Scenario: can stop following a tag from the homepage
38
    When I go to the followed tags stream page
39
    And I preemptively confirm the alert
danielgrippi's avatar
danielgrippi committed
40
    And I hover over the "li.unfollow#tag-following-boss"
41 42
    And I follow "unfollow_boss"
    And I wait for the ajax to finish
danielgrippi's avatar
danielgrippi committed
43
    Then I should not see "#tag-following-boss" within ".left_nav"