summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/project/commits/tags.feature46
-rw-r--r--features/project/create.feature16
-rw-r--r--features/steps/dashboard/issues.rb2
-rw-r--r--features/steps/dashboard/merge_requests.rb2
-rw-r--r--features/steps/profile/profile.rb2
-rw-r--r--features/steps/project/commits/tags.rb90
-rw-r--r--features/steps/project/create.rb26
-rw-r--r--features/steps/project/hooks.rb2
-rw-r--r--features/steps/project/team_management.rb2
9 files changed, 8 insertions, 180 deletions
diff --git a/features/project/commits/tags.feature b/features/project/commits/tags.feature
deleted file mode 100644
index a4be39b2d40..00000000000
--- a/features/project/commits/tags.feature
+++ /dev/null
@@ -1,46 +0,0 @@
-@project_commits
-Feature: Project Commits Tags
- Background:
- Given I sign in as a user
- And I own project "Shop"
- Given I visit project tags page
-
- Scenario: I can see all git tags
- Then I should see "Shop" all tags list
-
- Scenario: I create a tag
- And I click new tag link
- And I submit new tag form
- Then I should see new tag created
-
- Scenario: I create a tag with release notes
- Given I click new tag link
- And I submit new tag form with release notes
- Then I should see new tag created
- And I should see tag release notes
-
- Scenario: I create a tag with invalid name
- And I click new tag link
- And I submit new tag form with invalid name
- Then I should see new an error that tag is invalid
-
- Scenario: I create a tag with invalid reference
- And I click new tag link
- And I submit new tag form with invalid reference
- Then I should see new an error that tag ref is invalid
-
- Scenario: I create a tag that already exists
- And I click new tag link
- And I submit new tag form with tag that already exists
- Then I should see new an error that tag already exists
-
- Scenario: I delete a tag
- Given I visit tag 'v1.1.0' page
- Given I delete tag 'v1.1.0'
- Then I should not see tag 'v1.1.0'
-
- Scenario: I add release notes to the tag
- Given I visit tag 'v1.1.0' page
- When I click edit tag link
- And I fill release notes and submit form
- Then I should see tag release notes
diff --git a/features/project/create.feature b/features/project/create.feature
index 27136798e36..67336d73bf7 100644
--- a/features/project/create.feature
+++ b/features/project/create.feature
@@ -7,20 +7,8 @@ Feature: Project Create
@javascript
Scenario: User create a project
Given I sign in as a user
- When I visit new project page
- And I have an ssh key
- And fill project form with valid data
- Then I should see project page
- And I should see empty project instuctions
-
- @javascript
- Scenario: Empty project instructions
- Given I sign in as a user
And I have an ssh key
When I visit new project page
And fill project form with valid data
- Then I see empty project instuctions
- And I click on HTTP
- Then Remote url should update to http link
- And If I click on SSH
- Then Remote url should update to ssh link
+ Then I should see project page
+ And I should see empty project instructions
diff --git a/features/steps/dashboard/issues.rb b/features/steps/dashboard/issues.rb
index e21af72a777..8706f0e8e78 100644
--- a/features/steps/dashboard/issues.rb
+++ b/features/steps/dashboard/issues.rb
@@ -74,7 +74,7 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
def project
@project ||= begin
- project =create :project
+ project = create :project
project.team << [current_user, :master]
project
end
diff --git a/features/steps/dashboard/merge_requests.rb b/features/steps/dashboard/merge_requests.rb
index a2adc87f8ef..06db36c7014 100644
--- a/features/steps/dashboard/merge_requests.rb
+++ b/features/steps/dashboard/merge_requests.rb
@@ -100,7 +100,7 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
def project
@project ||= begin
- project =create :project
+ project = create :project
project.team << [current_user, :master]
project
end
diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb
index 909de31a479..b1a87b96efd 100644
--- a/features/steps/profile/profile.rb
+++ b/features/steps/profile/profile.rb
@@ -166,7 +166,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
end
step 'I have group with projects' do
- @group = create(:group)
+ @group = create(:group)
@group.add_owner(current_user)
@project = create(:project, namespace: @group)
@event = create(:closed_issue_event, project: @project)
diff --git a/features/steps/project/commits/tags.rb b/features/steps/project/commits/tags.rb
deleted file mode 100644
index 912ba580efd..00000000000
--- a/features/steps/project/commits/tags.rb
+++ /dev/null
@@ -1,90 +0,0 @@
-class Spinach::Features::ProjectCommitsTags < Spinach::FeatureSteps
- include SharedAuthentication
- include SharedProject
- include SharedPaths
-
- step 'I should see "Shop" all tags list' do
- expect(page).to have_content "Tags"
- expect(page).to have_content "v1.0.0"
- end
-
- step 'I click new tag link' do
- click_link 'New tag'
- end
-
- step 'I submit new tag form' do
- fill_in 'tag_name', with: 'v7.0'
- fill_in 'ref', with: 'master'
- click_button 'Create tag'
- end
-
- step 'I submit new tag form with release notes' do
- fill_in 'tag_name', with: 'v7.0'
- fill_in 'ref', with: 'master'
- fill_in 'release_description', with: 'Awesome release notes'
- click_button 'Create tag'
- end
-
- step 'I fill release notes and submit form' do
- fill_in 'release_description', with: 'Awesome release notes'
- click_button 'Save changes'
- end
-
- step 'I submit new tag form with invalid name' do
- fill_in 'tag_name', with: 'v 1.0'
- fill_in 'ref', with: 'master'
- click_button 'Create tag'
- end
-
- step 'I submit new tag form with invalid reference' do
- fill_in 'tag_name', with: 'foo'
- fill_in 'ref', with: 'foo'
- click_button 'Create tag'
- end
-
- step 'I submit new tag form with tag that already exists' do
- fill_in 'tag_name', with: 'v1.0.0'
- fill_in 'ref', with: 'master'
- click_button 'Create tag'
- end
-
- step 'I should see new tag created' do
- expect(page).to have_content 'v7.0'
- end
-
- step 'I should see new an error that tag is invalid' do
- expect(page).to have_content 'Tag name invalid'
- end
-
- step 'I should see new an error that tag ref is invalid' do
- expect(page).to have_content 'Target foo is invalid'
- end
-
- step 'I should see new an error that tag already exists' do
- expect(page).to have_content 'Tag v1.0.0 already exists'
- end
-
- step "I visit tag 'v1.1.0' page" do
- click_link 'v1.1.0'
- end
-
- step "I delete tag 'v1.1.0'" do
- page.within('.content') do
- first('.btn-remove').click
- end
- end
-
- step "I should not see tag 'v1.1.0'" do
- page.within '.tags' do
- expect(page).not_to have_link 'v1.1.0'
- end
- end
-
- step 'I click edit tag link' do
- click_link 'Edit release notes'
- end
-
- step 'I should see tag release notes' do
- expect(page).to have_content 'Awesome release notes'
- end
-end
diff --git a/features/steps/project/create.rb b/features/steps/project/create.rb
index 422b151eaa2..5f5f806df36 100644
--- a/features/steps/project/create.rb
+++ b/features/steps/project/create.rb
@@ -13,33 +13,9 @@ class Spinach::Features::ProjectCreate < Spinach::FeatureSteps
expect(current_path).to eq namespace_project_path(Project.last.namespace, Project.last)
end
- step 'I should see empty project instuctions' do
+ step 'I should see empty project instructions' do
expect(page).to have_content "git init"
expect(page).to have_content "git remote"
expect(page).to have_content Project.last.url_to_repo
end
-
- step 'I see empty project instuctions' do
- expect(page).to have_content "git init"
- expect(page).to have_content "git remote"
- expect(page).to have_content Project.last.url_to_repo
- end
-
- step 'I click on HTTP' do
- find('#clone-dropdown').click
- find('.http-selector').click
- end
-
- step 'Remote url should update to http link' do
- expect(page).to have_content "git remote add origin #{Project.last.http_url_to_repo}"
- end
-
- step 'If I click on SSH' do
- find('#clone-dropdown').click
- find('.ssh-selector').click
- end
-
- step 'Remote url should update to ssh link' do
- expect(page).to have_content "git remote add origin #{Project.last.url_to_repo}"
- end
end
diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb
index b1ffe7f7b4c..13c0713669a 100644
--- a/features/steps/project/hooks.rb
+++ b/features/steps/project/hooks.rb
@@ -59,7 +59,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
step 'hook should be triggered' do
expect(current_path).to eq namespace_project_hooks_path(current_project.namespace, current_project)
expect(page).to have_selector '.flash-notice',
- text: 'Hook successfully executed.'
+ text: 'Hook executed successfully: HTTP 200'
end
step 'I should see hook error message' do
diff --git a/features/steps/project/team_management.rb b/features/steps/project/team_management.rb
index 3fbcf770b62..c6ced747370 100644
--- a/features/steps/project/team_management.rb
+++ b/features/steps/project/team_management.rb
@@ -126,7 +126,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
step 'I share project with group "OpenSource"' do
project = Project.find_by(name: 'Shop')
- os_group = create(:group, name: 'OpenSource')
+ os_group = create(:group, name: 'OpenSource')
create(:project, group: os_group)
@os_user1 = create(:user)
@os_user2 = create(:user)