Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-08-30 18:49:22 +0300
committerPhil Hughes <me@iamphill.com>2017-08-30 18:49:22 +0300
commit4d2d744ae9a2d4c3bb0f00805c27704b79e00d72 (patch)
tree839b1c3ab4c09c80f7d643fe69dae8a83c4e4eb4 /features
parent25a3b7fab905d09f6f064108f457a4e20c8915ff (diff)
parentf7c8434c7100c3c87eb2a75cd5a128e520d8c110 (diff)
Merge branch 'master' into enable-new-navigaton-by-default
Diffstat (limited to 'features')
-rw-r--r--features/project/commits/user_lookup.feature16
-rw-r--r--features/project/star.feature39
-rw-r--r--features/steps/project/commits/user_lookup.rb49
-rw-r--r--features/steps/project/star.rb37
4 files changed, 0 insertions, 141 deletions
diff --git a/features/project/commits/user_lookup.feature b/features/project/commits/user_lookup.feature
deleted file mode 100644
index c18f4e070f3..00000000000
--- a/features/project/commits/user_lookup.feature
+++ /dev/null
@@ -1,16 +0,0 @@
-@project_commits
-Feature: Project Commits User Lookup
- Background:
- Given I sign in as a user
- And I own a project
- And I visit my project's commits page
-
- Scenario: I browse commit from list
- Given I have user with primary email
- When I click on commit link
- Then I see author based on primary email
-
- Scenario: I browse another commit from list
- Given I have user with secondary email
- When I click on another commit link
- Then I see author based on secondary email
diff --git a/features/project/star.feature b/features/project/star.feature
deleted file mode 100644
index 618f44fe6dc..00000000000
--- a/features/project/star.feature
+++ /dev/null
@@ -1,39 +0,0 @@
-@project-stars
-Feature: Project Star
- Scenario: New projects have 0 stars
- Given public project "Community"
- When I visit project "Community" page
- Then The project has no stars
-
- Scenario: Empty projects show star count
- Given public empty project "Empty Public Project"
- When I visit empty project page
- Then The project has no stars
-
- 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
- Then I redirected to sign in page
-
- @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
diff --git a/features/steps/project/commits/user_lookup.rb b/features/steps/project/commits/user_lookup.rb
deleted file mode 100644
index 4599e0d032a..00000000000
--- a/features/steps/project/commits/user_lookup.rb
+++ /dev/null
@@ -1,49 +0,0 @@
-class Spinach::Features::ProjectCommitsUserLookup < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedProject
- include SharedPaths
-
- step 'I click on commit link' do
- visit project_commit_path(@project, sample_commit.id)
- end
-
- step 'I click on another commit link' do
- visit project_commit_path(@project, sample_commit.parent_id)
- end
-
- step 'I have user with primary email' do
- user_primary
- end
-
- step 'I have user with secondary email' do
- user_secondary
- end
-
- step 'I see author based on primary email' do
- check_author_link(sample_commit.author_email, user_primary)
- end
-
- step 'I see author based on secondary email' do
- check_author_link(sample_commit.author_email, user_secondary)
- end
-
- def check_author_link(email, user)
- author_link = find('.commit-author-link')
-
- expect(author_link['href']).to eq user_path(user)
- expect(author_link['title']).to eq email
- expect(find('.commit-author-name').text).to eq user.name
- end
-
- def user_primary
- @user_primary ||= create(:user, email: 'dmitriy.zaporozhets@gmail.com')
- end
-
- def user_secondary
- @user_secondary ||= begin
- user = create(:user, email: 'dzaporozhets@example.com')
- create(:email, { user: user, email: 'dmitriy.zaporozhets@gmail.com' })
- user
- end
- end
-end
diff --git a/features/steps/project/star.rb b/features/steps/project/star.rb
deleted file mode 100644
index 9f7c748a3b7..00000000000
--- a/features/steps/project/star.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-class Spinach::Features::ProjectStar < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedProject
- include SharedPaths
- include SharedUser
-
- step "The project has no stars" do
- expect(page).not_to have_content '.toggle-star'
- end
-
- step "The project has 0 stars" do
- has_n_stars(0)
- end
-
- step "The project has 1 star" do
- has_n_stars(1)
- end
-
- step "The project has 2 stars" do
- has_n_stars(2)
- end
-
- # Requires @javascript
- step "I click on the star toggle button" do
- find(".star-btn", visible: true).click
- end
-
- step 'I redirected to sign in page' do
- expect(current_path).to eq new_user_session_path
- end
-
- protected
-
- def has_n_stars(n)
- expect(page).to have_css(".star-count", text: n, visible: true)
- end
-end