user.feature 3.23 KB
Newer Older
1 2
Feature: User
  Background:
3
    Given User "John Doe" exists
4
    And "John Doe" owns private project "Enterprise"
5 6 7

  # Signed out

8
  @javascript
9 10 11
  Scenario: I visit user "John Doe" page while not signed in when he owns a public project
    Given "John Doe" owns internal project "Internal"
    And "John Doe" owns public project "Community"
12
    When I visit user "John Doe" page
Alfredo Sumaran's avatar
Alfredo Sumaran committed
13
    And I click on "Personal projects" tab
14 15 16 17 18 19 20
    Then I should see user "John Doe" page
    And I should not see project "Enterprise"
    And I should not see project "Internal"
    And I should see project "Community"

  # Signed in as someone else

21
  @javascript
22 23 24
  Scenario: I visit user "John Doe" page while signed in as someone else when he owns a public project
    Given "John Doe" owns public project "Community"
    And "John Doe" owns internal project "Internal"
25 26
    And I sign in as a user
    When I visit user "John Doe" page
Alfredo Sumaran's avatar
Alfredo Sumaran committed
27
    And I click on "Personal projects" tab
28 29 30 31 32
    Then I should see user "John Doe" page
    And I should not see project "Enterprise"
    And I should see project "Internal"
    And I should see project "Community"

33
  @javascript
34
  Scenario: I visit user "John Doe" page while signed in as someone else when he is not authorized to a public project
35
    Given "John Doe" owns internal project "Internal"
36 37
    And I sign in as a user
    When I visit user "John Doe" page
Alfredo Sumaran's avatar
Alfredo Sumaran committed
38
    And I click on "Personal projects" tab
39 40 41 42 43
    Then I should see user "John Doe" page
    And I should not see project "Enterprise"
    And I should see project "Internal"
    And I should not see project "Community"

44
  @javascript
45 46 47
  Scenario: I visit user "John Doe" page while signed in as someone else when he is not authorized to a project I can see
    Given I sign in as a user
    When I visit user "John Doe" page
Alfredo Sumaran's avatar
Alfredo Sumaran committed
48
    And I click on "Personal projects" tab
49 50 51 52 53 54 55
    Then I should see user "John Doe" page
    And I should not see project "Enterprise"
    And I should not see project "Internal"
    And I should not see project "Community"

  # Signed in as the user himself

56
  @javascript
57
  Scenario: I visit user "John Doe" page while signed in as "John Doe" when he has a public project
58 59
    Given "John Doe" owns internal project "Internal"
    And "John Doe" owns public project "Community"
60 61
    And I sign in as "John Doe"
    When I visit user "John Doe" page
Alfredo Sumaran's avatar
Alfredo Sumaran committed
62
    And I click on "Personal projects" tab
63 64 65 66 67
    Then I should see user "John Doe" page
    And I should see project "Enterprise"
    And I should see project "Internal"
    And I should see project "Community"

68
  @javascript
69 70 71
  Scenario: I visit user "John Doe" page while signed in as "John Doe" when he has no public project
    Given I sign in as "John Doe"
    When I visit user "John Doe" page
Alfredo Sumaran's avatar
Alfredo Sumaran committed
72
    And I click on "Personal projects" tab
73 74 75 76
    Then I should see user "John Doe" page
    And I should see project "Enterprise"
    And I should not see project "Internal"
    And I should not see project "Community"
77 78 79 80 81 82

  @javascript
  Scenario: "John Doe" contribution profile
    Given I sign in as a user
    And "John Doe" has contributions
    When I visit user "John Doe" page
Alfredo Sumaran's avatar
Alfredo Sumaran committed
83
    And I click on "Contributed projects" tab
84 85 86
    Then I should see user "John Doe" page
    And I should see contributed projects
    And I should see contributions calendar