cirandas.net

ref: master

features/private_profile.feature


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Feature: private profiles
  As a profile administrator
  I want to set it to private
  So that only members/friends can view its contents

  Background:
    Given the following community
      | identifier | name     | public_profile |
      | safernet   | Safernet | false          |
    And the following users
      | login   | public_profile |
      | joao    | true           |
      | shygirl | false          |

  Scenario: joining a private community
    Given I am logged in as "joao"
    When I go to safernet's homepage
    Then I should see "members only"
    When I follow "Join"
    And "joao" is accepted on community "Safernet"
    Then "joao" should be a member of "Safernet"
    When I go to Safernet's homepage
    And I should not see "members only"

  Scenario: adding a friend with private profile
    Given I am logged in as "joao"
    When I go to shygirl's homepage
    Then I should see "friends only"
    And I follow "Add friend"
    When I go to shygirl's homepage
    Then I should not see "Add friend"

  Scenario: person private profiles should not display sensible information
    Given I am logged in as "joao"
    When I go to shygirl's homepage
    Then I should not see "Basic information"
    Then I should not see "Work"
    Then I should not see "Enterprises"
    Then I should not see "Network"

  Scenario: community private profiles should not display sensible information
    Given I am logged in as "joao"
    When I go to Safernet's homepage
    Then I should not see "Basic information"