summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/explore/groups.feature14
-rw-r--r--features/groups.feature11
-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
8 files changed, 39 insertions, 22 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/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 0404fd5e594..079a190e356 100644
--- a/features/steps/project/project.rb
+++ b/features/steps/project/project.rb
@@ -124,10 +124,10 @@ 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
end
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