drawer.feature 5.44 KB
Newer Older
1 2
@javascript @mobile
Feature: Navigate between pages using the header menu and the drawer
3
  As a user
4
  I want to be able navigate between the pages of the mobile version
5 6

  Background:
7
    Given a user with email "alice@alice.alice"
8
    And I sign in as "alice@alice.alice" on the mobile website
9 10

  Scenario: navigate to the stream page
11
    When I go to the activity stream page
12
    And I click on selector ".header-title"
13
    Then I should be on the stream page
14 15

  Scenario: navigate to the notification page
16 17
    When I click on selector "#notification-badge"
    Then I should be on the notifications page
18 19

  Scenario: navigate to the conversation page
20 21
    When I click on selector "#conversations-badge"
    Then I should be on the conversations page
22 23

  Scenario: navigate to the publisher page
24 25
    When I click on selector "#compose-badge"
    Then I should be on the new status message page
26

27 28
  Scenario: search a user
    When I open the drawer
29 30
    Then I should see a "#q" within "#drawer"
    When I search for "Bob"
31
    Then I should see "Users matching Bob" within "#search_title"
32

33 34
  Scenario: search for a tag
    When I open the drawer
35 36 37
    Then I should see a "#q" within "#drawer"
    When I search for "#bob"
    Then I should be on the tag page for "bob"
38

39 40 41 42 43
  Scenario: navigate to the stream page
    When I open the drawer
    And I click on "Stream" in the drawer
    Then I should be on the stream page

44
  Scenario: navigate to my activity page
45
    When I open the drawer
46 47
    And I click on "My activity" in the drawer
    Then I should be on the activity stream page
48 49

  Scenario: navigate to my mentions page
50
    When I open the drawer
51 52
    And I click on "@Mentions" in the drawer
    Then I should be on the mentioned stream page
53

54 55
  Scenario: navigate to aspects pages
    Given I have a limited post with text "Hi you!" in the aspect "Besties"
56
    When I open the drawer
57
    Then I should not see "All aspects" within "#drawer"
58
    And I click on "My aspects" in the drawer
59 60 61 62 63 64 65
    And I click on "All aspects" in the drawer
    Then I should be on the aspects page
    And I should see "Hi you!" within "#main-stream"
    When I open the drawer
    And I click on "My aspects" in the drawer
    And I click on "Unicorns" in the drawer
    And I should not see "Hi you!" within "#main-stream"
66 67

  Scenario: navigate to the followed tags page
68 69 70 71 72 73 74 75 76
    When I follow the "boss" tag
    And I go to the stream page
    And I open the drawer
    Then I should not see "All tags" within "#drawer"
    And I click on "#Followed tags" in the drawer
    And I click on "All tags" in the drawer
    Then I should be on the followed tags stream page

  Scenario: navigate to the boss tag page
77 78 79 80 81 82 83
    When I follow the "boss" tag
    And I go to the stream page
    And I open the drawer
    And I click on "#Followed tags" in the drawer
    And I click on "#boss" in the drawer
    Then I should be on the tag page for "boss"

84
    When I open the drawer
85 86 87
    And I click on "#Followed tags" in the drawer
    And I click on "Manage followed tags" in the drawer
    Then I should be on the manage tag followings page
88

89 90 91 92 93
  Scenario: navigate to the public stream page
    When I open the drawer
    And I click on "Public activity" in the drawer
    Then I should be on the public stream page

94
  Scenario: navigate to my profile page
95
    When I open the drawer
96 97
    And I click on "Profile" in the drawer
    Then I should be on my profile page
98

99
  Scenario: navigate to my contacts page
100
    When I open the drawer
101 102
    And I click on "Contacts" in the drawer
    Then I should be on the contacts page
103

104
  Scenario: navigate to my settings page
105
    When I open the drawer
106 107
    And I click on "Settings" in the drawer
    Then I should be on my account settings page
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148

  Scenario: navigate to the moderation page
    Given a moderator with email "bob@bob.bob"
    And I sign in as "bob@bob.bob" on the mobile website
    When I open the drawer
    Then I should not see "Admin" within "#drawer"
    And I should see "Reports" within "#drawer"
    When I click on "Reports" in the drawer
    Then I should see "Reports overview" within "#main h1"

  Scenario: navigate to the admin pages
    Given an admin with email "bob@bob.bob"
    And I sign in as "bob@bob.bob" on the mobile website
    When I open the drawer
    Then I should not see "Reports" within "#drawer"
    Then I should not see "Dashboard" within "#drawer"
    When I click on "Admin" in the drawer
    And I click on "Dashboard" in the drawer
    Then I should see "Pod status" within "#main h2"
    When I click on "Admin" in the drawer
    And I click on "User search" in the drawer
    Then I should see "User search" within "#main h3"
    When I click on "Admin" in the drawer
    And I click on "Weekly user stats" in the drawer
    Then I should see "Current server date is " within "#main h2"
    When I click on "Admin" in the drawer
    And I click on "Pod stats" in the drawer
    Then I should see "Usage statistics" within "#main h1"
    When I click on "Admin" in the drawer
    And I click on "Reports" in the drawer
    Then I should see "Reports overview" within "#main h1"
    When I click on "Admin" in the drawer
    And I click on "Pod network" in the drawer
    Then I should see "Pod network" within "#main h2"
    When I click on "Admin" in the drawer
    Then I should see "Sidekiq monitor" within "#drawer"

  Scenario: users doesn't have access to the admin pages
    When I open the drawer
    Then I should not see "Admin" within "#drawer"
    Then I should not see "Reports" within "#drawer"