star.feature 1.22 KB
Newer Older
Jacob Schatz's avatar
Jacob Schatz committed
1
@project-stars
Ciro Santilli's avatar
Ciro Santilli committed
2 3 4 5
Feature: Project Star
  Scenario: New projects have 0 stars
    Given public project "Community"
    When I visit project "Community" page
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
6
    Then The project has no stars
Ciro Santilli's avatar
Ciro Santilli committed
7 8 9 10

  Scenario: Empty projects show star count
    Given public empty project "Empty Public Project"
    When I visit empty project page
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
11
    Then The project has no stars
Ciro Santilli's avatar
Ciro Santilli committed
12 13 14 15 16

  Scenario: Signed off users can't star projects
    Given public project "Community"
    And I visit project "Community" page
    When I click on the star toggle button
17
    Then I redirected to sign in page
Ciro Santilli's avatar
Ciro Santilli committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

  @javascript
  Scenario: Signed in users can toggle star
    Given I sign in as "John Doe"
    And public project "Community"
    And I visit project "Community" page
    When I click on the star toggle button
    Then The project has 1 star
    When I click on the star toggle button
    Then The project has 0 stars

  @javascript
  Scenario: Star count sums stars
    Given I sign in as "John Doe"
    And public project "Community"
    And I visit project "Community" page
    And I click on the star toggle button
    And I logout
    And I sign in as "Mary Jane"
    And I visit project "Community" page
    When I click on the star toggle button
    Then The project has 2 stars