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:
authorWinnie Hellmann <winnie@gitlab.com>2018-07-05 09:32:05 +0300
committerRémy Coutable <remy@rymai.me>2018-07-05 09:32:05 +0300
commit3db2f327594e134729a0ca2f48a748bb28ab7d6c (patch)
tree661033b988897aaf506c0deaf457c2002e17d51b /spec/features/tags
parentbaab4cddb091c0aa9649fecc340b8b343747ba83 (diff)
Enable Capybara/FeatureMethods cop
Diffstat (limited to 'spec/features/tags')
-rw-r--r--spec/features/tags/master_creates_tag_spec.rb14
-rw-r--r--spec/features/tags/master_deletes_tag_spec.rb8
-rw-r--r--spec/features/tags/master_updates_tag_spec.rb8
-rw-r--r--spec/features/tags/master_views_tags_spec.rb14
4 files changed, 22 insertions, 22 deletions
diff --git a/spec/features/tags/master_creates_tag_spec.rb b/spec/features/tags/master_creates_tag_spec.rb
index 6701f575a23..b4e8253057b 100644
--- a/spec/features/tags/master_creates_tag_spec.rb
+++ b/spec/features/tags/master_creates_tag_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Master creates tag' do
+describe 'Master creates tag' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, namespace: user.namespace) }
@@ -14,25 +14,25 @@ feature 'Master creates tag' do
visit project_tags_path(project)
end
- scenario 'with an invalid name displays an error' do
+ it 'with an invalid name displays an error' do
create_tag_in_form(tag: 'v 1.0', ref: 'master')
expect(page).to have_content 'Tag name invalid'
end
- scenario 'with an invalid reference displays an error' do
+ it 'with an invalid reference displays an error' do
create_tag_in_form(tag: 'v2.0', ref: 'foo')
expect(page).to have_content 'Target foo is invalid'
end
- scenario 'that already exists displays an error' do
+ it 'that already exists displays an error' do
create_tag_in_form(tag: 'v1.1.0', ref: 'master')
expect(page).to have_content 'Tag v1.1.0 already exists'
end
- scenario 'with multiline message displays the message in a <pre> block' do
+ it 'with multiline message displays the message in a <pre> block' do
create_tag_in_form(tag: 'v3.0', ref: 'master', message: "Awesome tag message\n\n- hello\n- world")
expect(current_path).to eq(
@@ -43,7 +43,7 @@ feature 'Master creates tag' do
end
end
- scenario 'with multiline release notes parses the release note as Markdown' do
+ it 'with multiline release notes parses the release note as Markdown' do
create_tag_in_form(tag: 'v4.0', ref: 'master', desc: "Awesome release notes\n\n- hello\n- world")
expect(current_path).to eq(
@@ -55,7 +55,7 @@ feature 'Master creates tag' do
end
end
- scenario 'opens dropdown for ref', :js do
+ it 'opens dropdown for ref', :js do
click_link 'New tag'
ref_row = find('.form-group:nth-of-type(2) .col-sm-10')
page.within ref_row do
diff --git a/spec/features/tags/master_deletes_tag_spec.rb b/spec/features/tags/master_deletes_tag_spec.rb
index 1d4df2c55a7..1443e259ed9 100644
--- a/spec/features/tags/master_deletes_tag_spec.rb
+++ b/spec/features/tags/master_deletes_tag_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Master deletes tag' do
+describe 'Master deletes tag' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, namespace: user.namespace) }
@@ -11,7 +11,7 @@ feature 'Master deletes tag' do
end
context 'from the tags list page', :js do
- scenario 'deletes the tag' do
+ it 'deletes the tag' do
expect(page).to have_content 'v1.1.0'
delete_first_tag
@@ -21,7 +21,7 @@ feature 'Master deletes tag' do
end
context 'from a specific tag page' do
- scenario 'deletes the tag' do
+ it 'deletes the tag' do
click_on 'v1.0.0'
expect(current_path).to eq(
project_tag_path(project, 'v1.0.0'))
@@ -40,7 +40,7 @@ feature 'Master deletes tag' do
.and_raise(Gitlab::Git::PreReceiveError, 'Do not delete tags')
end
- scenario 'shows the error message' do
+ it 'shows the error message' do
delete_first_tag
expect(page).to have_content('Do not delete tags')
diff --git a/spec/features/tags/master_updates_tag_spec.rb b/spec/features/tags/master_updates_tag_spec.rb
index 26f51bee887..4c0be6be96c 100644
--- a/spec/features/tags/master_updates_tag_spec.rb
+++ b/spec/features/tags/master_updates_tag_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Master updates tag' do
+describe 'Master updates tag' do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, namespace: user.namespace) }
@@ -11,7 +11,7 @@ feature 'Master updates tag' do
end
context 'from the tags list page' do
- scenario 'updates the release notes' do
+ it 'updates the release notes' do
page.within(first('.content-list .controls')) do
click_link 'Edit release notes'
end
@@ -25,7 +25,7 @@ feature 'Master updates tag' do
expect(page).to have_content 'Awesome release notes'
end
- scenario 'description has emoji autocomplete', :js do
+ it 'description has emoji autocomplete', :js do
page.within(first('.content-list .controls')) do
click_link 'Edit release notes'
end
@@ -38,7 +38,7 @@ feature 'Master updates tag' do
end
context 'from a specific tag page' do
- scenario 'updates the release notes' do
+ it 'updates the release notes' do
click_on 'v1.1.0'
click_link 'Edit release notes'
fill_in 'release_description', with: 'Awesome release notes'
diff --git a/spec/features/tags/master_views_tags_spec.rb b/spec/features/tags/master_views_tags_spec.rb
index b625e7065cc..02ce0242614 100644
--- a/spec/features/tags/master_views_tags_spec.rb
+++ b/spec/features/tags/master_views_tags_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-feature 'Master views tags' do
+describe 'Master views tags' do
let(:user) { create(:user) }
before do
@@ -19,7 +19,7 @@ feature 'Master views tags' do
visit project_tags_path(project)
end
- scenario 'displays a specific message' do
+ it 'displays a specific message' do
expect(page).to have_content 'Repository has no tags yet.'
end
end
@@ -32,7 +32,7 @@ feature 'Master views tags' do
visit project_tags_path(project)
end
- scenario 'avoids a N+1 query in branches index' do
+ it 'avoids a N+1 query in branches index' do
control_count = ActiveRecord::QueryRecorder.new { visit project_tags_path(project) }.count
%w(one two three four five).each { |tag| repository.add_tag(user, tag, 'master', 'foo') }
@@ -40,11 +40,11 @@ feature 'Master views tags' do
expect { visit project_tags_path(project) }.not_to exceed_query_limit(control_count)
end
- scenario 'views the tags list page' do
+ it 'views the tags list page' do
expect(page).to have_content 'v1.0.0'
end
- scenario 'views a specific tag page' do
+ it 'views a specific tag page' do
click_on 'v1.0.0'
expect(current_path).to eq(
@@ -54,7 +54,7 @@ feature 'Master views tags' do
end
describe 'links on the tag page' do
- scenario 'has a button to browse files' do
+ it 'has a button to browse files' do
click_on 'v1.0.0'
expect(current_path).to eq(
@@ -66,7 +66,7 @@ feature 'Master views tags' do
project_tree_path(project, 'v1.0.0'))
end
- scenario 'has a button to browse commits' do
+ it 'has a button to browse commits' do
click_on 'v1.0.0'
expect(current_path).to eq(