summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2015-09-16 19:52:57 -0500
committerPatricio Cano <suprnova32@gmail.com>2015-09-16 19:52:57 -0500
commit1ef2ce95d507c3d21598f26dd8a0e77dfc3c33cf (patch)
treedc7a80b0f77f98e9f1a6898644f4961cac2c2d60 /features
parent4c98357f16b1acfa793d8a5b28c7147e21f20356 (diff)
parentc99473e57ca90f95c4e31fc1582fb94731257442 (diff)
downloadgitlab-ce-1ef2ce95d507c3d21598f26dd8a0e77dfc3c33cf.tar.gz
Merge branch 'master' into notification-levels
Diffstat (limited to 'features')
-rw-r--r--features/explore/groups.feature14
-rw-r--r--features/groups.feature11
-rw-r--r--features/steps/admin/users.rb6
-rw-r--r--features/steps/groups.rb22
-rw-r--r--features/steps/invites.rb2
-rw-r--r--features/steps/project/fork.rb2
-rw-r--r--features/steps/project/project.rb4
-rw-r--r--features/steps/shared/paths.rb4
-rw-r--r--features/steps/snippets/user.rb2
9 files changed, 43 insertions, 24 deletions
diff --git a/features/explore/groups.feature b/features/explore/groups.feature
index c11634bd74a..a42e59c98f2 100644
--- a/features/explore/groups.feature
+++ b/features/explore/groups.feature
@@ -3,20 +3,6 @@ Feature: Explore Groups
Background:
Given group "TestGroup" has private project "Enterprise"
- Scenario: I should not see group with private projects as visitor
- When I visit group "TestGroup" page
- Then I should be redirected to sign in page
-
- Scenario: I should not see group with private projects group as user
- When I sign in as a user
- And I visit group "TestGroup" page
- Then page status code should be 404
-
- Scenario: I should not see group with private and internal projects as visitor
- Given group "TestGroup" has internal project "Internal"
- When I visit group "TestGroup" page
- Then I should be redirected to sign in page
-
Scenario: I should see group with private and internal projects as user
Given group "TestGroup" has internal project "Internal"
When I sign in as a user
diff --git a/features/groups.feature b/features/groups.feature
index d5272fdddcf..db37fa3b375 100644
--- a/features/groups.feature
+++ b/features/groups.feature
@@ -159,3 +159,14 @@ Feature: Groups
When I visit group "Owned" projects page
Then I should see group "Owned" projects list
And I should see "archived" label
+
+ # Public group
+ @javascript
+ Scenario: Signed out user should see group
+ Given "Mary Jane" is owner of group "Owned"
+ And I am a signed out user
+ And Group "Owned" has a public project "Public-project"
+ When I visit group "Owned" page
+ Then I should see group "Owned"
+ Then I should see project "Public-project"
+
diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb
index 2e17d5c4c2e..4bc290b6bdf 100644
--- a/features/steps/admin/users.rb
+++ b/features/steps/admin/users.rb
@@ -4,11 +4,13 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
include SharedAdmin
before do
- allow(Devise).to receive(:omniauth_providers).and_return([:twitter, :twitter_updated])
+ allow(Gitlab::OAuth::Provider).to receive(:providers).and_return([:twitter, :twitter_updated])
+ allow_any_instance_of(ApplicationHelper).to receive(:user_omniauth_authorize_path).and_return(root_path)
end
after do
- allow(Devise).to receive(:omniauth_providers).and_call_original
+ allow(Gitlab::OAuth::Provider).to receive(:providers).and_call_original
+ allow_any_instance_of(ApplicationHelper).to receive(:user_omniauth_authorize_path).and_call_original
end
step 'I should see all users' do
diff --git a/features/steps/groups.rb b/features/steps/groups.rb
index 18a1c4d32ce..95bc9baf8d8 100644
--- a/features/steps/groups.rb
+++ b/features/steps/groups.rb
@@ -6,7 +6,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
include Select2Helper
step 'I should see back to dashboard button' do
- expect(page).to have_content 'Back to Dashboard'
+ expect(page).to have_content 'Back to dashboard'
end
step 'gitlab user "Mike"' do
@@ -17,6 +17,26 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
find(:css, 'button.btn-new').click
end
+ step 'I should see group "Owned"' do
+ expect(page).to have_content '@owned'
+ end
+
+ step 'I am a signed out user' do
+ logout
+ end
+
+ step 'Group "Owned" has a public project "Public-project"' do
+ group = Group.find_by(name: "Owned")
+
+ @project = create :empty_project, :public,
+ group: group,
+ name: "Public-project"
+ end
+
+ step 'I should see project "Public-project"' do
+ expect(page).to have_content 'Public-project'
+ end
+
step 'I select "Mike" as "Reporter"' do
user = User.find_by(name: "Mike")
diff --git a/features/steps/invites.rb b/features/steps/invites.rb
index 5e8feff5095..dac972172aa 100644
--- a/features/steps/invites.rb
+++ b/features/steps/invites.rb
@@ -63,7 +63,7 @@ class Spinach::Features::Invites < Spinach::FeatureSteps
end
step 'I should be redirected to the dashboard' do
- expect(current_path).to eq(dashboard_path)
+ expect(current_path).to eq(dashboard_projects_path)
end
step 'I should see a notice telling me I have declined' do
diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb
index 0e433781d7a..370960845cc 100644
--- a/features/steps/project/fork.rb
+++ b/features/steps/project/fork.rb
@@ -15,7 +15,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
end
step 'I should see the forked project page' do
- expect(page).to have_content "Project was successfully forked."
+ expect(page).to have_content "Forked from"
end
step 'I already have a project named "Shop" in my namespace' do
diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb
index 390a0ba9703..15f77734cb2 100644
--- a/features/steps/project/project.rb
+++ b/features/steps/project/project.rb
@@ -124,11 +124,11 @@ class Spinach::Features::Project < Spinach::FeatureSteps
end
step 'I should see back to dashboard button' do
- expect(page).to have_content 'Back to Dashboard'
+ expect(page).to have_content 'Back to dashboard'
end
step 'I should see back to group button' do
- expect(page).to have_content 'Back to Group'
+ expect(page).to have_content 'Back to group'
end
step 'I click notifications drop down button' do
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index b4deccb6520..eb978620da6 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -68,7 +68,7 @@ module SharedPaths
# ----------------------------------------
step 'I visit dashboard page' do
- visit dashboard_path
+ visit dashboard_projects_path
end
step 'I visit dashboard activity page' do
@@ -460,7 +460,7 @@ module SharedPaths
end
step 'I visit snippets page' do
- visit snippets_path
+ visit explore_snippets_path
end
step 'I visit new snippet page' do
diff --git a/features/steps/snippets/user.rb b/features/steps/snippets/user.rb
index 007fcb2893f..dea3256229f 100644
--- a/features/steps/snippets/user.rb
+++ b/features/steps/snippets/user.rb
@@ -4,7 +4,7 @@ class Spinach::Features::SnippetsUser < Spinach::FeatureSteps
include SharedSnippet
step 'I visit my snippets page' do
- visit user_snippets_path(current_user)
+ visit dashboard_snippets_path
end
step 'I should see "Personal snippet one" in snippets' do