diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-07-05 06:32:05 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-07-05 06:32:05 +0000 |
commit | 3db2f327594e134729a0ca2f48a748bb28ab7d6c (patch) | |
tree | 661033b988897aaf506c0deaf457c2002e17d51b /qa | |
parent | baab4cddb091c0aa9649fecc340b8b343747ba83 (diff) | |
download | gitlab-ce-3db2f327594e134729a0ca2f48a748bb28ab7d6c.tar.gz |
Enable Capybara/FeatureMethods cop
Diffstat (limited to 'qa')
21 files changed, 52 insertions, 52 deletions
diff --git a/qa/qa/specs/features/api/basics_spec.rb b/qa/qa/specs/features/api/basics_spec.rb index 1d7f9d6a03c..6563b56d1b4 100644 --- a/qa/qa/specs/features/api/basics_spec.rb +++ b/qa/qa/specs/features/api/basics_spec.rb @@ -1,7 +1,7 @@ require 'securerandom' module QA - feature 'API basics', :core do + describe 'API basics', :core do before(:context) do @api_client = Runtime::API::Client.new(:gitlab) end @@ -9,7 +9,7 @@ module QA let(:project_name) { "api-basics-#{SecureRandom.hex(8)}" } let(:sanitized_project_path) { CGI.escape("#{Runtime::User.name}/#{project_name}") } - scenario 'user creates a project with a file and deletes them afterwards' do + it 'user creates a project with a file and deletes them afterwards' do create_project_request = Runtime::API::Request.new(@api_client, '/projects') post create_project_request.url, path: project_name, name: project_name diff --git a/qa/qa/specs/features/api/users_spec.rb b/qa/qa/specs/features/api/users_spec.rb index 0aecf89e1b7..8a63d8095c9 100644 --- a/qa/qa/specs/features/api/users_spec.rb +++ b/qa/qa/specs/features/api/users_spec.rb @@ -1,5 +1,5 @@ module QA - feature 'API users', :core do + describe 'API users', :core do before(:context) do @api_client = Runtime::API::Client.new(:gitlab) end @@ -7,13 +7,13 @@ module QA context 'when authenticated' do let(:request) { Runtime::API::Request.new(@api_client, '/users') } - scenario 'get list of users' do + it 'get list of users' do get request.url expect_status(200) end - scenario 'submit request with a valid user name' do + it 'submit request with a valid user name' do get request.url, { params: { username: Runtime::User.name } } expect_status(200) @@ -22,7 +22,7 @@ module QA ) end - scenario 'submit request with an invalid user name' do + it 'submit request with an invalid user name' do get request.url, { params: { username: SecureRandom.hex(10) } } expect_status(200) @@ -30,7 +30,7 @@ module QA end end - scenario 'submit request with an invalid token' do + it 'submit request with an invalid token' do request = Runtime::API::Request.new(@api_client, '/users', private_token: 'invalid') get request.url diff --git a/qa/qa/specs/features/login/ldap_spec.rb b/qa/qa/specs/features/login/ldap_spec.rb index 737f4d10053..b7a284c584b 100644 --- a/qa/qa/specs/features/login/ldap_spec.rb +++ b/qa/qa/specs/features/login/ldap_spec.rb @@ -1,10 +1,10 @@ module QA - feature 'LDAP user login', :ldap do + describe 'LDAP user login', :ldap do before do Runtime::Env.user_type = 'ldap' end - scenario 'user logs in using LDAP credentials' do + it 'user logs in using LDAP credentials' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/login/standard_spec.rb b/qa/qa/specs/features/login/standard_spec.rb index 141ffa3cfb7..254f47cf217 100644 --- a/qa/qa/specs/features/login/standard_spec.rb +++ b/qa/qa/specs/features/login/standard_spec.rb @@ -1,6 +1,6 @@ module QA - feature 'standard user login', :core do - scenario 'user logs in using credentials' do + describe 'standard user login', :core do + it 'user logs in using credentials' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/mattermost/group_create_spec.rb b/qa/qa/specs/features/mattermost/group_create_spec.rb index 2e27a285223..a59761da341 100644 --- a/qa/qa/specs/features/mattermost/group_create_spec.rb +++ b/qa/qa/specs/features/mattermost/group_create_spec.rb @@ -1,6 +1,6 @@ module QA - feature 'create a new group', :mattermost do - scenario 'creating a group with a mattermost team' do + describe 'create a new group', :mattermost do + it 'creating a group with a mattermost team' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } Page::Menu::Main.act { go_to_groups } diff --git a/qa/qa/specs/features/mattermost/login_spec.rb b/qa/qa/specs/features/mattermost/login_spec.rb index 637bbdd643a..b140191e160 100644 --- a/qa/qa/specs/features/mattermost/login_spec.rb +++ b/qa/qa/specs/features/mattermost/login_spec.rb @@ -1,6 +1,6 @@ module QA - feature 'logging in to Mattermost', :mattermost do - scenario 'can use gitlab oauth' do + describe 'logging in to Mattermost', :mattermost do + it 'can use gitlab oauth' do Runtime::Browser.visit(:gitlab, Page::Main::Login) do Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/merge_request/create_spec.rb b/qa/qa/specs/features/merge_request/create_spec.rb index befbc0b281a..18e8c1f35af 100644 --- a/qa/qa/specs/features/merge_request/create_spec.rb +++ b/qa/qa/specs/features/merge_request/create_spec.rb @@ -1,6 +1,6 @@ module QA - feature 'creates a merge request', :core do - scenario 'user creates a new merge request' do + describe 'creates a merge request', :core do + it 'user creates a new merge request' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/merge_request/rebase_spec.rb b/qa/qa/specs/features/merge_request/rebase_spec.rb index 6a0ed4592c4..163dcbe7963 100644 --- a/qa/qa/specs/features/merge_request/rebase_spec.rb +++ b/qa/qa/specs/features/merge_request/rebase_spec.rb @@ -1,6 +1,6 @@ module QA - feature 'merge request rebase', :core do - scenario 'rebases source branch of merge request' do + describe 'merge request rebase', :core do + it 'rebases source branch of merge request' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/merge_request/squash_spec.rb b/qa/qa/specs/features/merge_request/squash_spec.rb index b68704154cf..f0ad4bfd701 100644 --- a/qa/qa/specs/features/merge_request/squash_spec.rb +++ b/qa/qa/specs/features/merge_request/squash_spec.rb @@ -1,6 +1,6 @@ module QA - feature 'merge request squash commits', :core do - scenario 'when squash commits is marked before merge' do + describe 'merge request squash commits', :core do + it 'when squash commits is marked before merge' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/project/activity_spec.rb b/qa/qa/specs/features/project/activity_spec.rb index 07ac7321aa2..02074e386b6 100644 --- a/qa/qa/specs/features/project/activity_spec.rb +++ b/qa/qa/specs/features/project/activity_spec.rb @@ -1,6 +1,6 @@ module QA - feature 'activity page', :core do - scenario 'push creates an event in the activity page' do + describe 'activity page', :core do + it 'push creates an event in the activity page' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/project/add_deploy_key_spec.rb b/qa/qa/specs/features/project/add_deploy_key_spec.rb index de53613dee1..14642af97ad 100644 --- a/qa/qa/specs/features/project/add_deploy_key_spec.rb +++ b/qa/qa/specs/features/project/add_deploy_key_spec.rb @@ -1,6 +1,6 @@ module QA - feature 'deploy keys support', :core do - scenario 'user adds a deploy key' do + describe 'deploy keys support', :core do + it 'user adds a deploy key' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/project/add_secret_variable_spec.rb b/qa/qa/specs/features/project/add_secret_variable_spec.rb index d1bf7849bd0..32c91dd9d4d 100644 --- a/qa/qa/specs/features/project/add_secret_variable_spec.rb +++ b/qa/qa/specs/features/project/add_secret_variable_spec.rb @@ -1,6 +1,6 @@ module QA - feature 'secret variables support', :core do - scenario 'user adds a secret variable' do + describe 'secret variables support', :core do + it 'user adds a secret variable' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/project/auto_devops_spec.rb b/qa/qa/specs/features/project/auto_devops_spec.rb index c50a13432f5..bc713b46d81 100644 --- a/qa/qa/specs/features/project/auto_devops_spec.rb +++ b/qa/qa/specs/features/project/auto_devops_spec.rb @@ -1,12 +1,12 @@ require 'pathname' module QA - feature 'Auto Devops', :kubernetes do + describe 'Auto Devops', :kubernetes do after do @cluster&.remove! end - scenario 'user creates a new project and runs auto devops' do + it 'user creates a new project and runs auto devops' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/project/create_issue_spec.rb b/qa/qa/specs/features/project/create_issue_spec.rb index b73f108c2d9..ac2ed2ca2a1 100644 --- a/qa/qa/specs/features/project/create_issue_spec.rb +++ b/qa/qa/specs/features/project/create_issue_spec.rb @@ -1,8 +1,8 @@ module QA - feature 'creates issue', :core do + describe 'creates issue', :core do let(:issue_title) { 'issue title' } - scenario 'user creates issue' do + it 'user creates issue' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/project/create_spec.rb b/qa/qa/specs/features/project/create_spec.rb index b1c07249892..14ecd464685 100644 --- a/qa/qa/specs/features/project/create_spec.rb +++ b/qa/qa/specs/features/project/create_spec.rb @@ -1,6 +1,6 @@ module QA - feature 'create a new project', :core do - scenario 'user creates a new project' do + describe 'create a new project', :core do + it 'user creates a new project' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/project/deploy_key_clone_spec.rb b/qa/qa/specs/features/project/deploy_key_clone_spec.rb index 10e4cbb6906..054f49b408a 100644 --- a/qa/qa/specs/features/project/deploy_key_clone_spec.rb +++ b/qa/qa/specs/features/project/deploy_key_clone_spec.rb @@ -1,7 +1,7 @@ require 'digest/sha1' module QA - feature 'cloning code using a deploy key', :core, :docker do + describe 'cloning code using a deploy key', :core, :docker do def login Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } @@ -39,7 +39,7 @@ module QA ] keys.each do |(key_class, bits)| - scenario "user sets up a deploy key with #{key_class}(#{bits}) to clone code using pipelines" do + it "user sets up a deploy key with #{key_class}(#{bits}) to clone code using pipelines" do key = key_class.new(*bits) login diff --git a/qa/qa/specs/features/project/pipelines_spec.rb b/qa/qa/specs/features/project/pipelines_spec.rb index bdb3d671516..ddedde7a8bc 100644 --- a/qa/qa/specs/features/project/pipelines_spec.rb +++ b/qa/qa/specs/features/project/pipelines_spec.rb @@ -1,12 +1,12 @@ module QA - feature 'CI/CD Pipelines', :core, :docker do + describe 'CI/CD Pipelines', :core, :docker do let(:executor) { "qa-runner-#{Time.now.to_i}" } after do Service::Runner.new(executor).remove! end - scenario 'user registers a new specific runner' do + it 'user registers a new specific runner' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } @@ -25,7 +25,7 @@ module QA end end - scenario 'users creates a new pipeline' do + it 'users creates a new pipeline' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } diff --git a/qa/qa/specs/features/project/wikis_spec.rb b/qa/qa/specs/features/project/wikis_spec.rb index 49290a1a896..59cc455fffc 100644 --- a/qa/qa/specs/features/project/wikis_spec.rb +++ b/qa/qa/specs/features/project/wikis_spec.rb @@ -1,5 +1,5 @@ module QA - feature 'Wiki Functionality', :core do + describe 'Wiki Functionality', :core do def login Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } @@ -14,7 +14,7 @@ module QA login end - scenario 'User creates, edits, clones, and pushes to the wiki' do + it 'User creates, edits, clones, and pushes to the wiki' do wiki = Factory::Resource::Wiki.fabricate! do |resource| resource.title = 'Home' resource.content = '# My First Wiki Content' diff --git a/qa/qa/specs/features/repository/clone_spec.rb b/qa/qa/specs/features/repository/clone_spec.rb index bc9eb57bdb4..a04ce4e44d9 100644 --- a/qa/qa/specs/features/repository/clone_spec.rb +++ b/qa/qa/specs/features/repository/clone_spec.rb @@ -1,7 +1,7 @@ module QA - feature 'clone code from the repository', :core do + describe 'clone code from the repository', :core do context 'with regular account over http' do - given(:location) do + let(:location) do Page::Project::Show.act do choose_repository_clone_http repository_location @@ -31,7 +31,7 @@ module QA end end - scenario 'user performs a deep clone' do + it 'user performs a deep clone' do Git::Repository.perform do |repository| repository.uri = location.uri repository.use_default_credentials @@ -42,7 +42,7 @@ module QA end end - scenario 'user performs a shallow clone' do + it 'user performs a shallow clone' do Git::Repository.perform do |repository| repository.uri = location.uri repository.use_default_credentials diff --git a/qa/qa/specs/features/repository/protected_branches_spec.rb b/qa/qa/specs/features/repository/protected_branches_spec.rb index c5b8c271d7d..29ea2e69ec7 100644 --- a/qa/qa/specs/features/repository/protected_branches_spec.rb +++ b/qa/qa/specs/features/repository/protected_branches_spec.rb @@ -1,8 +1,8 @@ module QA - feature 'branch protection support', :core do - given(:branch_name) { 'protected-branch' } - given(:commit_message) { 'Protected push commit message' } - given(:project) do + describe 'branch protection support', :core do + let(:branch_name) { 'protected-branch' } + let(:commit_message) { 'Protected push commit message' } + let(:project) do Factory::Resource::Project.fabricate! do |resource| resource.name = 'protected-branch-project' end @@ -27,7 +27,7 @@ module QA context 'when developers and maintainers are allowed to push to a protected branch' do let!(:protected_branch) { create_protected_branch(allow_to_push: true) } - scenario 'user with push rights successfully pushes to the protected branch' do + it 'user with push rights successfully pushes to the protected branch' do expect(protected_branch.name).to have_content(branch_name) expect(protected_branch.push_allowance).to have_content('Developers + Maintainers') @@ -38,7 +38,7 @@ module QA end context 'when developers and maintainers are not allowed to push to a protected branch' do - scenario 'user without push rights fails to push to the protected branch' do + it 'user without push rights fails to push to the protected branch' do create_protected_branch(allow_to_push: false) @push = push_new_file(branch_name) diff --git a/qa/qa/specs/features/repository/push_spec.rb b/qa/qa/specs/features/repository/push_spec.rb index 16aaa2e6762..fc40b60d915 100644 --- a/qa/qa/specs/features/repository/push_spec.rb +++ b/qa/qa/specs/features/repository/push_spec.rb @@ -1,7 +1,7 @@ module QA - feature 'push code to repository', :core do + describe 'push code to repository', :core do context 'with regular account over http' do - scenario 'user pushes code to the repository' do + it 'user pushes code to the repository' do Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.act { sign_in_using_credentials } |