Commit 32620938 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use :js instead of js: true for spec

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent ff6eb578
require 'spec_helper' require 'spec_helper'
describe 'Service Desk Issue Tracker', js: true do describe 'Service Desk Issue Tracker', :js do
let(:project) { create(:project, :private, service_desk_enabled: true) } let(:project) { create(:project, :private, service_desk_enabled: true) }
let(:user) { create(:user) } let(:user) { create(:user) }
......
require 'spec_helper' require 'spec_helper'
describe 'Project variables EE', js: true do describe 'Project variables EE', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
let(:variable) { create(:ci_variable, key: 'test_key', value: 'test value') } let(:variable) { create(:ci_variable, key: 'test_key', value: 'test value') }
......
...@@ -20,13 +20,13 @@ feature 'Groups > Members > Master/Owner can override LDAP access levels' do ...@@ -20,13 +20,13 @@ feature 'Groups > Members > Master/Owner can override LDAP access levels' do
sign_in(owner) sign_in(owner)
end end
scenario 'override not available on project members page', js: true do scenario 'override not available on project members page', :js do
visit namespace_project_project_members_path(group, project) visit namespace_project_project_members_path(group, project)
expect(page).not_to have_button 'Edit permissions' expect(page).not_to have_button 'Edit permissions'
end end
scenario 'owner cannot override LDAP access level', js: true do scenario 'owner cannot override LDAP access level', :js do
stub_application_setting(allow_group_owners_to_manage_ldap: false) stub_application_setting(allow_group_owners_to_manage_ldap: false)
visit group_group_members_path(group) visit group_group_members_path(group)
...@@ -38,7 +38,7 @@ feature 'Groups > Members > Master/Owner can override LDAP access levels' do ...@@ -38,7 +38,7 @@ feature 'Groups > Members > Master/Owner can override LDAP access levels' do
end end
end end
scenario 'owner can override LDAP access level', js: true do scenario 'owner can override LDAP access level', :js do
ldap_override_message = 'John Doe is currently an LDAP user. Editing their permissions will override the settings from the LDAP group sync.' ldap_override_message = 'John Doe is currently an LDAP user. Editing their permissions will override the settings from the LDAP group sync.'
visit group_group_members_path(group) visit group_group_members_path(group)
......
...@@ -165,7 +165,7 @@ feature 'Issue Sidebar' do ...@@ -165,7 +165,7 @@ feature 'Issue Sidebar' do
end end
end end
context 'updating weight', js: true do context 'updating weight', :js do
before do before do
project.team << [user, :master] project.team << [user, :master]
visit_issue(project, issue) visit_issue(project, issue)
......
...@@ -402,7 +402,7 @@ describe 'Issues', :js do ...@@ -402,7 +402,7 @@ describe 'Issues', :js do
end end
end end
describe 'update weight from issue#show', js: true do describe 'update weight from issue#show', :js do
let!(:issue) { create(:issue, project: project) } let!(:issue) { create(:issue, project: project) }
before do before do
......
...@@ -208,7 +208,7 @@ feature 'Merge request approvals', :js do ...@@ -208,7 +208,7 @@ feature 'Merge request approvals', :js do
sign_in(user) sign_in(user)
end end
context 'when group is assigned to a project', js: true do context 'when group is assigned to a project', :js do
before do before do
create :approver_group, group: group, target: project create :approver_group, group: group, target: project
visit project_merge_request_path(project, merge_request) visit project_merge_request_path(project, merge_request)
...@@ -227,7 +227,7 @@ feature 'Merge request approvals', :js do ...@@ -227,7 +227,7 @@ feature 'Merge request approvals', :js do
end end
end end
context 'when group is assigned to a merge request', js: true do context 'when group is assigned to a merge request', :js do
before do before do
create :approver_group, group: group, target: merge_request create :approver_group, group: group, target: merge_request
visit project_merge_request_path(project, merge_request) visit project_merge_request_path(project, merge_request)
...@@ -247,7 +247,7 @@ feature 'Merge request approvals', :js do ...@@ -247,7 +247,7 @@ feature 'Merge request approvals', :js do
end end
end end
context 'when CI is running but no approval given', js: true do context 'when CI is running but no approval given', :js do
before do before do
create :approver_group, group: group, target: merge_request create :approver_group, group: group, target: merge_request
pipeline = create(:ci_empty_pipeline, project: project, sha: merge_request.diff_head_sha, ref: merge_request.source_branch) pipeline = create(:ci_empty_pipeline, project: project, sha: merge_request.diff_head_sha, ref: merge_request.source_branch)
......
...@@ -76,7 +76,7 @@ feature 'Merge Request closing issues message', :js do ...@@ -76,7 +76,7 @@ feature 'Merge Request closing issues message', :js do
end end
end end
context 'approvals are enabled while closing issues', js: true do context 'approvals are enabled while closing issues', :js do
before do before do
project.team << [user, :developer] project.team << [user, :developer]
end end
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
# This test serves as a regression test for a bug that caused an error # This test serves as a regression test for a bug that caused an error
# message to be shown by JavaScript when the source branch was deleted. # message to be shown by JavaScript when the source branch was deleted.
# Please do not remove "js: true". # Please do not remove ":js".
describe 'Deleted source branch', :js do describe 'Deleted source branch', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:merge_request) { create(:merge_request) } let(:merge_request) { create(:merge_request) }
......
require 'spec_helper' require 'spec_helper'
feature 'Project mirror', js: true do feature 'Project mirror', :js do
include ReactiveCachingHelpers include ReactiveCachingHelpers
let(:project) { create(:project, :mirror, :import_finished, :repository, creator: user, name: 'Victorialand') } let(:project) { create(:project, :mirror, :import_finished, :repository, creator: user, name: 'Victorialand') }
......
...@@ -5,7 +5,7 @@ feature 'Project remote mirror', feature: true do ...@@ -5,7 +5,7 @@ feature 'Project remote mirror', feature: true do
let(:remote_mirror) { project.remote_mirrors.first } let(:remote_mirror) { project.remote_mirrors.first }
let(:user) { create(:user) } let(:user) { create(:user) }
describe 'On a project', js: true do describe 'On a project', :js do
before do before do
project.team << [user, :master] project.team << [user, :master]
sign_in user sign_in user
......
require 'spec_helper' require 'spec_helper'
describe 'Promotions', js: true do describe 'Promotions', :js do
let(:admin) { create(:admin) } let(:admin) { create(:admin) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:otherdeveloper) { create(:user, name: 'TheOtherDeveloper') } let(:otherdeveloper) { create(:user, name: 'TheOtherDeveloper') }
...@@ -44,7 +44,7 @@ describe 'Promotions', js: true do ...@@ -44,7 +44,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for project features in general', js: true do describe 'for project features in general', :js do
context 'for .com' do context 'for .com' do
before do before do
project.team << [user, :master] project.team << [user, :master]
...@@ -68,7 +68,7 @@ describe 'Promotions', js: true do ...@@ -68,7 +68,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for service desk', js: true do describe 'for service desk', :js do
before do before do
allow(License).to receive(:current).and_return(nil) allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false) stub_application_setting(check_namespace_plan: false)
...@@ -95,7 +95,7 @@ describe 'Promotions', js: true do ...@@ -95,7 +95,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for merge request improve', js: true do describe 'for merge request improve', :js do
before do before do
allow(License).to receive(:current).and_return(nil) allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false) stub_application_setting(check_namespace_plan: false)
...@@ -122,7 +122,7 @@ describe 'Promotions', js: true do ...@@ -122,7 +122,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for repository features', js: true do describe 'for repository features', :js do
before do before do
allow(License).to receive(:current).and_return(nil) allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false) stub_application_setting(check_namespace_plan: false)
...@@ -150,7 +150,7 @@ describe 'Promotions', js: true do ...@@ -150,7 +150,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for squash commits', js: true do describe 'for squash commits', :js do
before do before do
allow(License).to receive(:current).and_return(nil) allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false) stub_application_setting(check_namespace_plan: false)
...@@ -177,7 +177,7 @@ describe 'Promotions', js: true do ...@@ -177,7 +177,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for burndown charts', js: true do describe 'for burndown charts', :js do
before do before do
stub_application_setting(check_namespace_plan: true) stub_application_setting(check_namespace_plan: true)
allow(Gitlab).to receive(:com?) { true } allow(Gitlab).to receive(:com?) { true }
...@@ -204,7 +204,7 @@ describe 'Promotions', js: true do ...@@ -204,7 +204,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for issue boards ', js: true do describe 'for issue boards ', :js do
before do before do
stub_application_setting(check_namespace_plan: true) stub_application_setting(check_namespace_plan: true)
allow(Gitlab).to receive(:com?) { true } allow(Gitlab).to receive(:com?) { true }
...@@ -231,7 +231,7 @@ describe 'Promotions', js: true do ...@@ -231,7 +231,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for issue export', js: true do describe 'for issue export', :js do
before do before do
allow(License).to receive(:current).and_return(nil) allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false) stub_application_setting(check_namespace_plan: false)
...@@ -247,7 +247,7 @@ describe 'Promotions', js: true do ...@@ -247,7 +247,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for issue weight', js: true do describe 'for issue weight', :js do
before do before do
allow(License).to receive(:current).and_return(nil) allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false) stub_application_setting(check_namespace_plan: false)
...@@ -256,7 +256,7 @@ describe 'Promotions', js: true do ...@@ -256,7 +256,7 @@ describe 'Promotions', js: true do
sign_in(user) sign_in(user)
end end
it 'should appear on the page', js: true do it 'should appear on the page', :js do
visit project_issue_path(project, issue) visit project_issue_path(project, issue)
wait_for_requests wait_for_requests
find('.promote-weight-link').click find('.promote-weight-link').click
...@@ -264,7 +264,7 @@ describe 'Promotions', js: true do ...@@ -264,7 +264,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for issue templates', js: true do describe 'for issue templates', :js do
before do before do
allow(License).to receive(:current).and_return(nil) allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false) stub_application_setting(check_namespace_plan: false)
...@@ -273,7 +273,7 @@ describe 'Promotions', js: true do ...@@ -273,7 +273,7 @@ describe 'Promotions', js: true do
sign_in(user) sign_in(user)
end end
it 'should appear on the page', js: true do it 'should appear on the page', :js do
visit new_project_issue_path(project) visit new_project_issue_path(project)
wait_for_requests wait_for_requests
find('#promotion-issue-template-link').click find('#promotion-issue-template-link').click
...@@ -281,7 +281,7 @@ describe 'Promotions', js: true do ...@@ -281,7 +281,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for project audit events', js: true do describe 'for project audit events', :js do
before do before do
allow(License).to receive(:current).and_return(nil) allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false) stub_application_setting(check_namespace_plan: false)
...@@ -296,7 +296,7 @@ describe 'Promotions', js: true do ...@@ -296,7 +296,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for group contribution analytics', js: true do describe 'for group contribution analytics', :js do
before do before do
allow(License).to receive(:current).and_return(nil) allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false) stub_application_setting(check_namespace_plan: false)
...@@ -326,7 +326,7 @@ describe 'Promotions', js: true do ...@@ -326,7 +326,7 @@ describe 'Promotions', js: true do
end end
end end
describe 'for advanced search', js: true do describe 'for advanced search', :js do
before do before do
allow(License).to receive(:current).and_return(nil) allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false) stub_application_setting(check_namespace_plan: false)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment