Commit 45fb1f95 authored by Robert Speicher's avatar Robert Speicher

Change `login_as` uses to `gitlab_sign_in`

parent c1cbc273
...@@ -4,7 +4,7 @@ feature 'Abuse reports', feature: true do ...@@ -4,7 +4,7 @@ feature 'Abuse reports', feature: true do
let(:another_user) { create(:user) } let(:another_user) { create(:user) }
before do before do
login_as :user gitlab_sign_in :user
end end
scenario 'Report abuse' do scenario 'Report abuse' do
......
...@@ -5,7 +5,7 @@ describe "Admin::AbuseReports", feature: true, js: true do ...@@ -5,7 +5,7 @@ describe "Admin::AbuseReports", feature: true, js: true do
context 'as an admin' do context 'as an admin' do
before do before do
login_as :admin gitlab_sign_in :admin
end end
describe 'if a user has been reported for abuse' do describe 'if a user has been reported for abuse' do
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
RSpec.describe 'admin active tab' do RSpec.describe 'admin active tab' do
before do before do
login_as :admin gitlab_sign_in :admin
end end
shared_examples 'page has active tab' do |title| shared_examples 'page has active tab' do |title|
......
...@@ -4,7 +4,7 @@ feature 'Admin Appearance', feature: true do ...@@ -4,7 +4,7 @@ feature 'Admin Appearance', feature: true do
let!(:appearance) { create(:appearance) } let!(:appearance) { create(:appearance) }
scenario 'Create new appearance' do scenario 'Create new appearance' do
login_as :admin gitlab_sign_in :admin
visit admin_appearances_path visit admin_appearances_path
fill_in 'appearance_title', with: 'MyCompany' fill_in 'appearance_title', with: 'MyCompany'
...@@ -20,7 +20,7 @@ feature 'Admin Appearance', feature: true do ...@@ -20,7 +20,7 @@ feature 'Admin Appearance', feature: true do
end end
scenario 'Preview appearance' do scenario 'Preview appearance' do
login_as :admin gitlab_sign_in :admin
visit admin_appearances_path visit admin_appearances_path
click_link "Preview" click_link "Preview"
...@@ -34,7 +34,7 @@ feature 'Admin Appearance', feature: true do ...@@ -34,7 +34,7 @@ feature 'Admin Appearance', feature: true do
end end
scenario 'Appearance logo' do scenario 'Appearance logo' do
login_as :admin gitlab_sign_in :admin
visit admin_appearances_path visit admin_appearances_path
attach_file(:appearance_logo, logo_fixture) attach_file(:appearance_logo, logo_fixture)
...@@ -46,7 +46,7 @@ feature 'Admin Appearance', feature: true do ...@@ -46,7 +46,7 @@ feature 'Admin Appearance', feature: true do
end end
scenario 'Header logos' do scenario 'Header logos' do
login_as :admin gitlab_sign_in :admin
visit admin_appearances_path visit admin_appearances_path
attach_file(:appearance_header_logo, logo_fixture) attach_file(:appearance_header_logo, logo_fixture)
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
feature 'Admin Broadcast Messages', feature: true do feature 'Admin Broadcast Messages', feature: true do
before do before do
login_as :admin gitlab_sign_in :admin
create(:broadcast_message, :expired, message: 'Migration to new server') create(:broadcast_message, :expired, message: 'Migration to new server')
visit admin_broadcast_messages_path visit admin_broadcast_messages_path
end end
......
...@@ -4,7 +4,7 @@ describe 'Admin browse spam logs' do ...@@ -4,7 +4,7 @@ describe 'Admin browse spam logs' do
let!(:spam_log) { create(:spam_log, description: 'abcde ' * 20) } let!(:spam_log) { create(:spam_log, description: 'abcde ' * 20) }
before do before do
login_as :admin gitlab_sign_in :admin
end end
scenario 'Browse spam logs' do scenario 'Browse spam logs' do
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
describe 'Admin browses logs' do describe 'Admin browses logs' do
before do before do
login_as :admin gitlab_sign_in :admin
end end
it 'shows available log files' do it 'shows available log files' do
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
describe 'Admin Builds' do describe 'Admin Builds' do
before do before do
login_as :admin gitlab_sign_in :admin
end end
describe 'GET /admin/builds' do describe 'GET /admin/builds' do
......
...@@ -2,7 +2,7 @@ require 'rails_helper' ...@@ -2,7 +2,7 @@ require 'rails_helper'
feature 'Admin cohorts page', feature: true do feature 'Admin cohorts page', feature: true do
before do before do
login_as :admin gitlab_sign_in :admin
end end
scenario 'See users count per month' do scenario 'See users count per month' do
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
describe 'Admin Conversational Development Index' do describe 'Admin Conversational Development Index' do
before do before do
login_as :admin gitlab_sign_in :admin
end end
context 'when usage ping is disabled' do context 'when usage ping is disabled' do
......
...@@ -5,7 +5,7 @@ RSpec.describe 'admin deploy keys', type: :feature do ...@@ -5,7 +5,7 @@ RSpec.describe 'admin deploy keys', type: :feature do
let!(:another_deploy_key) { create(:another_deploy_key, public: true) } let!(:another_deploy_key) { create(:another_deploy_key, public: true) }
before do before do
login_as(:admin) gitlab_sign_in(:admin)
end end
it 'show all public deploy keys' do it 'show all public deploy keys' do
......
...@@ -8,7 +8,7 @@ feature 'Admin disables Git access protocol', feature: true do ...@@ -8,7 +8,7 @@ feature 'Admin disables Git access protocol', feature: true do
background do background do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
login_as(admin) gitlab_sign_in(admin)
end end
context 'with HTTP disabled' do context 'with HTTP disabled' do
......
...@@ -2,7 +2,7 @@ require 'rails_helper' ...@@ -2,7 +2,7 @@ require 'rails_helper'
feature 'Admin disables 2FA for a user', feature: true do feature 'Admin disables 2FA for a user', feature: true do
scenario 'successfully', js: true do scenario 'successfully', js: true do
login_as(:admin) gitlab_sign_in(:admin)
user = create(:user, :two_factor) user = create(:user, :two_factor)
edit_user(user) edit_user(user)
...@@ -17,7 +17,7 @@ feature 'Admin disables 2FA for a user', feature: true do ...@@ -17,7 +17,7 @@ feature 'Admin disables 2FA for a user', feature: true do
end end
scenario 'for a user without 2FA enabled' do scenario 'for a user without 2FA enabled' do
login_as(:admin) gitlab_sign_in(:admin)
user = create(:user) user = create(:user)
edit_user(user) edit_user(user)
......
...@@ -6,7 +6,7 @@ feature 'Admin Groups', feature: true do ...@@ -6,7 +6,7 @@ feature 'Admin Groups', feature: true do
let(:internal) { Gitlab::VisibilityLevel::INTERNAL } let(:internal) { Gitlab::VisibilityLevel::INTERNAL }
let(:user) { create :user } let(:user) { create :user }
let!(:group) { create :group } let!(:group) { create :group }
let!(:current_user) { login_as :admin } let!(:current_user) { gitlab_sign_in :admin }
before do before do
stub_application_setting(default_group_visibility: internal) stub_application_setting(default_group_visibility: internal)
......
...@@ -5,7 +5,7 @@ feature "Admin Health Check", feature: true do ...@@ -5,7 +5,7 @@ feature "Admin Health Check", feature: true do
before do before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
login_as :admin gitlab_sign_in :admin
end end
describe '#show' do describe '#show' do
......
...@@ -6,7 +6,7 @@ feature 'Admin::HookLogs', feature: true do ...@@ -6,7 +6,7 @@ feature 'Admin::HookLogs', feature: true do
let(:hook_log) { create(:web_hook_log, web_hook: system_hook, internal_error_message: 'some error') } let(:hook_log) { create(:web_hook_log, web_hook: system_hook, internal_error_message: 'some error') }
before do before do
login_as :admin gitlab_sign_in :admin
end end
scenario 'show list of hook logs' do scenario 'show list of hook logs' do
......
...@@ -3,7 +3,7 @@ require 'spec_helper' ...@@ -3,7 +3,7 @@ require 'spec_helper'
describe 'Admin::Hooks', feature: true do describe 'Admin::Hooks', feature: true do
before do before do
@project = create(:project) @project = create(:project)
login_as :admin gitlab_sign_in :admin
@system_hook = create(:system_hook) @system_hook = create(:system_hook)
end end
......
...@@ -5,7 +5,7 @@ RSpec.describe 'admin issues labels' do ...@@ -5,7 +5,7 @@ RSpec.describe 'admin issues labels' do
let!(:feature_label) { Label.create(title: 'feature', template: true) } let!(:feature_label) { Label.create(title: 'feature', template: true) }
before do before do
login_as :admin gitlab_sign_in :admin
end end
describe 'list' do describe 'list' do
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
RSpec.describe 'admin manage applications', feature: true do RSpec.describe 'admin manage applications', feature: true do
before do before do
login_as :admin gitlab_sign_in :admin
end end
it do it do
......
...@@ -6,7 +6,7 @@ describe "Admin::Projects", feature: true do ...@@ -6,7 +6,7 @@ describe "Admin::Projects", feature: true do
let(:user) { create :user } let(:user) { create :user }
let!(:project) { create(:project) } let!(:project) { create(:project) }
let!(:current_user) do let!(:current_user) do
login_as :admin gitlab_sign_in :admin
end end
describe "GET /admin/projects" do describe "GET /admin/projects" do
......
...@@ -3,7 +3,7 @@ require 'spec_helper' ...@@ -3,7 +3,7 @@ require 'spec_helper'
describe 'Admin::RequestsProfilesController', feature: true do describe 'Admin::RequestsProfilesController', feature: true do
before do before do
FileUtils.mkdir_p(Gitlab::RequestProfiler::PROFILES_DIR) FileUtils.mkdir_p(Gitlab::RequestProfiler::PROFILES_DIR)
login_as(:admin) gitlab_sign_in(:admin)
end end
after do after do
......
...@@ -5,7 +5,7 @@ describe "Admin Runners" do ...@@ -5,7 +5,7 @@ describe "Admin Runners" do
before do before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
login_as :admin gitlab_sign_in :admin
end end
describe "Runners page" do describe "Runners page" do
......
...@@ -5,7 +5,7 @@ feature 'Admin updates settings', feature: true do ...@@ -5,7 +5,7 @@ feature 'Admin updates settings', feature: true do
before do before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
login_as :admin gitlab_sign_in :admin
visit admin_application_settings_path visit admin_application_settings_path
end end
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
describe 'Admin System Info' do describe 'Admin System Info' do
before do before do
login_as :admin gitlab_sign_in :admin
end end
describe 'GET /admin/system_info' do describe 'GET /admin/system_info' do
......
...@@ -13,7 +13,7 @@ describe 'Admin > Users > Impersonation Tokens', feature: true, js: true do ...@@ -13,7 +13,7 @@ describe 'Admin > Users > Impersonation Tokens', feature: true, js: true do
end end
before do before do
login_as(admin) gitlab_sign_in(admin)
end end
describe "token creation" do describe "token creation" do
......
...@@ -5,7 +5,7 @@ describe "Admin::Users", feature: true do ...@@ -5,7 +5,7 @@ describe "Admin::Users", feature: true do
create(:omniauth_user, provider: 'twitter', extern_uid: '123456') create(:omniauth_user, provider: 'twitter', extern_uid: '123456')
end end
let!(:current_user) { login_as :admin } let!(:current_user) { gitlab_sign_in :admin }
describe "GET /admin/users" do describe "GET /admin/users" do
before do before do
......
...@@ -5,7 +5,7 @@ feature 'Admin uses repository checks', feature: true do ...@@ -5,7 +5,7 @@ feature 'Admin uses repository checks', feature: true do
before do before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false') stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
login_as :admin gitlab_sign_in :admin
end end
scenario 'to trigger a single check' do scenario 'to trigger a single check' do
......
...@@ -7,7 +7,7 @@ describe 'Auto deploy' do ...@@ -7,7 +7,7 @@ describe 'Auto deploy' do
before do before do
create :kubernetes_service, project: project create :kubernetes_service, project: project
project.team << [user, :master] project.team << [user, :master]
login_as user gitlab_sign_in user
end end
context 'when no deployment service is active' do context 'when no deployment service is active' do
......
...@@ -14,7 +14,7 @@ describe 'Issue Boards add issue modal', :feature, :js do ...@@ -14,7 +14,7 @@ describe 'Issue Boards add issue modal', :feature, :js do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
visit namespace_project_board_path(project.namespace, project, board) visit namespace_project_board_path(project.namespace, project, board)
wait_for_requests wait_for_requests
......
...@@ -12,7 +12,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -12,7 +12,7 @@ describe 'Issue Boards', feature: true, js: true do
project.team << [user, :master] project.team << [user, :master]
project.team << [user2, :master] project.team << [user2, :master]
login_as(user) gitlab_sign_in(user)
end end
context 'no lists' do context 'no lists' do
...@@ -543,7 +543,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -543,7 +543,7 @@ describe 'Issue Boards', feature: true, js: true do
before do before do
project.team << [user_guest, :guest] project.team << [user_guest, :guest]
logout logout
login_as(user_guest) gitlab_sign_in(user_guest)
visit namespace_project_board_path(project.namespace, project, board) visit namespace_project_board_path(project.namespace, project, board)
wait_for_requests wait_for_requests
end end
......
...@@ -15,7 +15,7 @@ describe 'Issue Boards', :feature, :js do ...@@ -15,7 +15,7 @@ describe 'Issue Boards', :feature, :js do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
end end
context 'un-ordered issues' do context 'un-ordered issues' do
......
...@@ -6,7 +6,7 @@ describe 'Issue Boards shortcut', feature: true, js: true do ...@@ -6,7 +6,7 @@ describe 'Issue Boards shortcut', feature: true, js: true do
before do before do
create(:board, project: project) create(:board, project: project)
login_as :admin gitlab_sign_in :admin
visit namespace_project_path(project.namespace, project) visit namespace_project_path(project.namespace, project)
end end
......
...@@ -12,7 +12,7 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do ...@@ -12,7 +12,7 @@ describe 'Issue Boards add issue modal filtering', :feature, :js do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
end end
it 'shows empty state when no results found' do it 'shows empty state when no results found' do
......
...@@ -10,7 +10,7 @@ describe 'Issue Boards new issue', feature: true, js: true do ...@@ -10,7 +10,7 @@ describe 'Issue Boards new issue', feature: true, js: true do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
visit namespace_project_board_path(project.namespace, project, board) visit namespace_project_board_path(project.namespace, project, board)
wait_for_requests wait_for_requests
......
...@@ -20,7 +20,7 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -20,7 +20,7 @@ describe 'Issue Boards', feature: true, js: true do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
visit namespace_project_board_path(project.namespace, project, board) visit namespace_project_board_path(project.namespace, project, board)
wait_for_requests wait_for_requests
......
...@@ -13,7 +13,7 @@ describe 'Sub-group project issue boards', :feature, :js do ...@@ -13,7 +13,7 @@ describe 'Sub-group project issue boards', :feature, :js do
before do before do
project.add_master(user) project.add_master(user)
login_as(user) gitlab_sign_in(user)
visit namespace_project_board_path(project.namespace, project, board) visit namespace_project_board_path(project.namespace, project, board)
wait_for_requests wait_for_requests
......
...@@ -68,7 +68,7 @@ feature 'Contributions Calendar', :feature, :js do ...@@ -68,7 +68,7 @@ feature 'Contributions Calendar', :feature, :js do
end end
before do before do
login_as user gitlab_sign_in user
end end
describe 'calendar day selection' do describe 'calendar day selection' do
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
describe 'CI Lint', js: true do describe 'CI Lint', js: true do
before do before do
login_as :user gitlab_sign_in :user
end end
describe 'YAML parsing' do describe 'YAML parsing' do
......
...@@ -7,7 +7,7 @@ describe 'Commits' do ...@@ -7,7 +7,7 @@ describe 'Commits' do
describe 'CI' do describe 'CI' do
before do before do
login_as :user gitlab_sign_in :user
stub_ci_pipeline_to_return_yaml_file stub_ci_pipeline_to_return_yaml_file
end end
......
...@@ -9,7 +9,7 @@ describe "Container Registry" do ...@@ -9,7 +9,7 @@ describe "Container Registry" do
end end
before do before do
login_as(user) gitlab_sign_in(user)
project.add_developer(user) project.add_developer(user)
stub_container_registry_config(enabled: true) stub_container_registry_config(enabled: true)
stub_container_registry_tags(repository: :any, tags: []) stub_container_registry_tags(repository: :any, tags: [])
......
...@@ -6,7 +6,7 @@ describe 'Copy as GFM', feature: true, js: true do ...@@ -6,7 +6,7 @@ describe 'Copy as GFM', feature: true, js: true do
include ActionView::Helpers::JavaScriptHelper include ActionView::Helpers::JavaScriptHelper
before do before do
login_as :admin gitlab_sign_in :admin
end end
describe 'Copying rendered GFM' do describe 'Copying rendered GFM' do
......
...@@ -14,7 +14,7 @@ feature 'Cycle Analytics', feature: true, js: true do ...@@ -14,7 +14,7 @@ feature 'Cycle Analytics', feature: true, js: true do
before do before do
project.add_master(user) project.add_master(user)
login_as(user) gitlab_sign_in(user)
visit namespace_project_cycle_analytics_path(project.namespace, project) visit namespace_project_cycle_analytics_path(project.namespace, project)
wait_for_requests wait_for_requests
...@@ -38,7 +38,7 @@ feature 'Cycle Analytics', feature: true, js: true do ...@@ -38,7 +38,7 @@ feature 'Cycle Analytics', feature: true, js: true do
create_cycle create_cycle
deploy_master deploy_master
login_as(user) gitlab_sign_in(user)
visit namespace_project_cycle_analytics_path(project.namespace, project) visit namespace_project_cycle_analytics_path(project.namespace, project)
end end
...@@ -70,7 +70,7 @@ feature 'Cycle Analytics', feature: true, js: true do ...@@ -70,7 +70,7 @@ feature 'Cycle Analytics', feature: true, js: true do
user.update_attribute(:preferred_language, 'es') user.update_attribute(:preferred_language, 'es')
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
visit namespace_project_cycle_analytics_path(project.namespace, project) visit namespace_project_cycle_analytics_path(project.namespace, project)
wait_for_requests wait_for_requests
end end
...@@ -93,7 +93,7 @@ feature 'Cycle Analytics', feature: true, js: true do ...@@ -93,7 +93,7 @@ feature 'Cycle Analytics', feature: true, js: true do
create_cycle create_cycle
deploy_master deploy_master
login_as(guest) gitlab_sign_in(guest)
visit namespace_project_cycle_analytics_path(project.namespace, project) visit namespace_project_cycle_analytics_path(project.namespace, project)
wait_for_requests wait_for_requests
end end
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
RSpec.describe 'Dashboard Active Tab', js: true, feature: true do RSpec.describe 'Dashboard Active Tab', js: true, feature: true do
before do before do
login_as :user gitlab_sign_in :user
end end
shared_examples 'page has active tab' do |title| shared_examples 'page has active tab' do |title|
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
RSpec.describe 'Dashboard Activity', feature: true do RSpec.describe 'Dashboard Activity', feature: true do
before do before do
login_as(create :user) gitlab_sign_in(create :user)
visit activity_dashboard_path visit activity_dashboard_path
end end
......
...@@ -9,7 +9,7 @@ RSpec.describe 'Dashboard Archived Project', feature: true do ...@@ -9,7 +9,7 @@ RSpec.describe 'Dashboard Archived Project', feature: true do
project.team << [user, :master] project.team << [user, :master]
archived_project.team << [user, :master] archived_project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
visit dashboard_projects_path visit dashboard_projects_path
end end
......
...@@ -13,7 +13,7 @@ feature 'Tooltips on .timeago dates', feature: true, js: true do ...@@ -13,7 +13,7 @@ feature 'Tooltips on .timeago dates', feature: true, js: true do
Event.create( project: project, author_id: user.id, action: Event::JOINED, Event.create( project: project, author_id: user.id, action: Event::JOINED,
updated_at: created_date, created_at: created_date) updated_at: created_date, created_at: created_date)
login_as user gitlab_sign_in user
visit user_path(user) visit user_path(user)
wait_for_requests() wait_for_requests()
...@@ -30,7 +30,7 @@ feature 'Tooltips on .timeago dates', feature: true, js: true do ...@@ -30,7 +30,7 @@ feature 'Tooltips on .timeago dates', feature: true, js: true do
project.team << [user, :master] project.team << [user, :master]
create(:snippet, author: user, updated_at: created_date, created_at: created_date) create(:snippet, author: user, updated_at: created_date, created_at: created_date)
login_as user gitlab_sign_in user
visit user_snippets_path(user) visit user_snippets_path(user)
wait_for_requests() wait_for_requests()
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
RSpec.describe 'Dashboard Group', feature: true do RSpec.describe 'Dashboard Group', feature: true do
before do before do
login_as(:user) gitlab_sign_in(:user)
end end
it 'creates new group', js: true do it 'creates new group', js: true do
......
...@@ -10,7 +10,7 @@ describe 'Dashboard Groups page', js: true, feature: true do ...@@ -10,7 +10,7 @@ describe 'Dashboard Groups page', js: true, feature: true do
group.add_owner(user) group.add_owner(user)
nested_group.add_owner(user) nested_group.add_owner(user)
login_as(user) gitlab_sign_in(user)
visit dashboard_groups_path visit dashboard_groups_path
expect(page).to have_content(group.full_name) expect(page).to have_content(group.full_name)
...@@ -23,7 +23,7 @@ describe 'Dashboard Groups page', js: true, feature: true do ...@@ -23,7 +23,7 @@ describe 'Dashboard Groups page', js: true, feature: true do
group.add_owner(user) group.add_owner(user)
nested_group.add_owner(user) nested_group.add_owner(user)
login_as(user) gitlab_sign_in(user)
visit dashboard_groups_path visit dashboard_groups_path
end end
...@@ -58,7 +58,7 @@ describe 'Dashboard Groups page', js: true, feature: true do ...@@ -58,7 +58,7 @@ describe 'Dashboard Groups page', js: true, feature: true do
group.add_owner(user) group.add_owner(user)
subgroup.add_owner(user) subgroup.add_owner(user)
login_as(user) gitlab_sign_in(user)
visit dashboard_groups_path visit dashboard_groups_path
end end
...@@ -98,7 +98,7 @@ describe 'Dashboard Groups page', js: true, feature: true do ...@@ -98,7 +98,7 @@ describe 'Dashboard Groups page', js: true, feature: true do
allow(Kaminari.config).to receive(:default_per_page).and_return(1) allow(Kaminari.config).to receive(:default_per_page).and_return(1)
login_as(user) gitlab_sign_in(user)
visit dashboard_groups_path visit dashboard_groups_path
end end
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
RSpec.describe 'Dashboard Help', feature: true do RSpec.describe 'Dashboard Help', feature: true do
before do before do
login_as(:user) gitlab_sign_in(:user)
end end
it 'renders correctly markdown' do it 'renders correctly markdown' do
......
...@@ -9,7 +9,7 @@ describe 'Navigation bar counter', feature: true, caching: true do ...@@ -9,7 +9,7 @@ describe 'Navigation bar counter', feature: true, caching: true do
before do before do
issue.assignees = [user] issue.assignees = [user]
merge_request.update(assignee: user) merge_request.update(assignee: user)
login_as(user) gitlab_sign_in(user)
end end
it 'reflects dashboard issues count' do it 'reflects dashboard issues count' do
......
...@@ -12,7 +12,7 @@ RSpec.describe 'Dashboard Issues', feature: true do ...@@ -12,7 +12,7 @@ RSpec.describe 'Dashboard Issues', feature: true do
before do before do
[project, project_with_issues_disabled].each { |project| project.team << [current_user, :master] } [project, project_with_issues_disabled].each { |project| project.team << [current_user, :master] }
login_as(current_user) gitlab_sign_in(current_user)
visit issues_dashboard_path(assignee_id: current_user.id) visit issues_dashboard_path(assignee_id: current_user.id)
end end
......
...@@ -11,7 +11,7 @@ describe 'Dashboard > label filter', feature: true, js: true do ...@@ -11,7 +11,7 @@ describe 'Dashboard > label filter', feature: true, js: true do
project.labels << label project.labels << label
project2.labels << label2 project2.labels << label2
login_as(user) gitlab_sign_in(user)
visit issues_dashboard_path visit issues_dashboard_path
end end
......
...@@ -8,7 +8,7 @@ describe 'Dashboard Merge Requests' do ...@@ -8,7 +8,7 @@ describe 'Dashboard Merge Requests' do
before do before do
[project, project_with_merge_requests_disabled].each { |project| project.team << [current_user, :master] } [project, project_with_merge_requests_disabled].each { |project| project.team << [current_user, :master] }
login_as(current_user) gitlab_sign_in(current_user)
end end
describe 'new merge request dropdown' do describe 'new merge request dropdown' do
......
...@@ -9,7 +9,7 @@ describe 'Dashboard > milestone filter', :feature, :js do ...@@ -9,7 +9,7 @@ describe 'Dashboard > milestone filter', :feature, :js do
let!(:issue2) { create :issue, author: user, project: project, milestone: milestone2 } let!(:issue2) { create :issue, author: user, project: project, milestone: milestone2 }
before do before do
login_as(user) gitlab_sign_in(user)
visit issues_dashboard_path(author_id: user.id) visit issues_dashboard_path(author_id: user.id)
end end
......
...@@ -15,7 +15,7 @@ describe 'Dashboard milestone tabs', :js, :feature do ...@@ -15,7 +15,7 @@ describe 'Dashboard milestone tabs', :js, :feature do
before do before do
project.add_master(user) project.add_master(user)
login_as(user) gitlab_sign_in(user)
visit dashboard_milestone_path(milestone.safe_title, title: milestone.title) visit dashboard_milestone_path(milestone.safe_title, title: milestone.title)
end end
......
...@@ -7,7 +7,7 @@ RSpec.describe 'Dashboard Projects', feature: true do ...@@ -7,7 +7,7 @@ RSpec.describe 'Dashboard Projects', feature: true do
before do before do
project.team << [user, :developer] project.team << [user, :developer]
login_as(user) gitlab_sign_in(user)
end end
it 'shows the project the user in a member of in the list' do it 'shows the project the user in a member of in the list' do
......
...@@ -3,7 +3,7 @@ require 'spec_helper' ...@@ -3,7 +3,7 @@ require 'spec_helper'
feature 'Dashboard shortcuts', :feature, :js do feature 'Dashboard shortcuts', :feature, :js do
context 'logged in' do context 'logged in' do
before do before do
login_as :user gitlab_sign_in :user
visit root_dashboard_path visit root_dashboard_path
end end
......
...@@ -6,7 +6,7 @@ describe 'Dashboard snippets', feature: true do ...@@ -6,7 +6,7 @@ describe 'Dashboard snippets', feature: true do
let!(:snippets) { create_list(:project_snippet, 2, :public, author: project.owner, project: project) } let!(:snippets) { create_list(:project_snippet, 2, :public, author: project.owner, project: project) }
before do before do
allow(Snippet).to receive(:default_per_page).and_return(1) allow(Snippet).to receive(:default_per_page).and_return(1)
login_as(project.owner) gitlab_sign_in(project.owner)
visit dashboard_snippets_path visit dashboard_snippets_path
end end
...@@ -25,7 +25,7 @@ describe 'Dashboard snippets', feature: true do ...@@ -25,7 +25,7 @@ describe 'Dashboard snippets', feature: true do
end end
before do before do
login_as(user) gitlab_sign_in(user)
visit dashboard_snippets_path visit dashboard_snippets_path
end end
......
...@@ -9,7 +9,7 @@ describe 'Dashboard > User filters projects', :feature do ...@@ -9,7 +9,7 @@ describe 'Dashboard > User filters projects', :feature do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
end end
describe 'filtering personal projects' do describe 'filtering personal projects' do
......
...@@ -8,7 +8,7 @@ describe "Dashboard Issues filtering", feature: true, js: true do ...@@ -8,7 +8,7 @@ describe "Dashboard Issues filtering", feature: true, js: true do
context 'filtering by milestone' do context 'filtering by milestone' do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
create(:issue, project: project, author: user, assignees: [user]) create(:issue, project: project, author: user, assignees: [user])
create(:issue, project: project, author: user, assignees: [user], milestone: milestone) create(:issue, project: project, author: user, assignees: [user], milestone: milestone)
......
...@@ -9,7 +9,7 @@ describe 'Discussion Comments Merge Request', :feature, :js do ...@@ -9,7 +9,7 @@ describe 'Discussion Comments Merge Request', :feature, :js do
before do before do
project.add_master(user) project.add_master(user)
login_as(user) gitlab_sign_in(user)
visit namespace_project_commit_path(project.namespace, project, sample_commit.id) visit namespace_project_commit_path(project.namespace, project, sample_commit.id)
end end
......
...@@ -7,7 +7,7 @@ describe 'Discussion Comments Issue', :feature, :js do ...@@ -7,7 +7,7 @@ describe 'Discussion Comments Issue', :feature, :js do
before do before do
project.add_master(user) project.add_master(user)
login_as(user) gitlab_sign_in(user)
visit namespace_project_issue_path(project.namespace, project, issue) visit namespace_project_issue_path(project.namespace, project, issue)
end end
......
...@@ -7,7 +7,7 @@ describe 'Discussion Comments Merge Request', :feature, :js do ...@@ -7,7 +7,7 @@ describe 'Discussion Comments Merge Request', :feature, :js do
before do before do
project.add_master(user) project.add_master(user)
login_as(user) gitlab_sign_in(user)
visit namespace_project_merge_request_path(project.namespace, project, merge_request) visit namespace_project_merge_request_path(project.namespace, project, merge_request)
end end
......
...@@ -7,7 +7,7 @@ describe 'Discussion Comments Issue', :feature, :js do ...@@ -7,7 +7,7 @@ describe 'Discussion Comments Issue', :feature, :js do
before do before do
project.add_master(user) project.add_master(user)
login_as(user) gitlab_sign_in(user)
visit namespace_project_snippet_path(project.namespace, project, snippet) visit namespace_project_snippet_path(project.namespace, project, snippet)
end end
......
...@@ -10,7 +10,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do ...@@ -10,7 +10,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
allow(Gitlab::Git::Diff).to receive(:size_limit).and_return(100.kilobytes) allow(Gitlab::Git::Diff).to receive(:size_limit).and_return(100.kilobytes)
allow(Gitlab::Git::Diff).to receive(:collapse_limit).and_return(10.kilobytes) allow(Gitlab::Git::Diff).to receive(:collapse_limit).and_return(10.kilobytes)
login_as :admin gitlab_sign_in :admin
# Ensure that undiffable.md is in .gitattributes # Ensure that undiffable.md is in .gitattributes
project.repository.copy_gitattributes(branch) project.repository.copy_gitattributes(branch)
......
...@@ -10,7 +10,7 @@ describe 'Explore Groups page', :js, :feature do ...@@ -10,7 +10,7 @@ describe 'Explore Groups page', :js, :feature do
before do before do
group.add_owner(user) group.add_owner(user)
login_as(user) gitlab_sign_in(user)
visit explore_groups_path visit explore_groups_path
end end
......
...@@ -16,7 +16,7 @@ feature 'Top Plus Menu', feature: true, js: true do ...@@ -16,7 +16,7 @@ feature 'Top Plus Menu', feature: true, js: true do
context 'used by full user' do context 'used by full user' do
before do before do
login_as(user) gitlab_sign_in(user)
end end
scenario 'click on New project shows new project page' do scenario 'click on New project shows new project page' do
...@@ -103,7 +103,7 @@ feature 'Top Plus Menu', feature: true, js: true do ...@@ -103,7 +103,7 @@ feature 'Top Plus Menu', feature: true, js: true do
context 'used by guest user' do context 'used by guest user' do
before do before do
login_as(guest_user) gitlab_sign_in(guest_user)
end end
scenario 'click on New issue shows new issue page' do scenario 'click on New issue shows new issue page' do
......
...@@ -10,7 +10,7 @@ describe "GitLab Flavored Markdown", feature: true do ...@@ -10,7 +10,7 @@ describe "GitLab Flavored Markdown", feature: true do
end end
before do before do
login_as(:user) gitlab_sign_in(:user)
project.add_developer(@user) project.add_developer(@user)
end end
......
...@@ -7,7 +7,7 @@ feature 'Group activity page', feature: true do ...@@ -7,7 +7,7 @@ feature 'Group activity page', feature: true do
context 'when signed in' do context 'when signed in' do
before do before do
user = create(:group_member, :developer, user: create(:user), group: group ).user user = create(:group_member, :developer, user: create(:user), group: group ).user
login_as(user) gitlab_sign_in(user)
visit path visit path
end end
......
...@@ -5,7 +5,7 @@ feature 'Groups Merge Requests Empty States' do ...@@ -5,7 +5,7 @@ feature 'Groups Merge Requests Empty States' do
let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user } let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user }
before do before do
login_as(user) gitlab_sign_in(user)
end end
context 'group has a project' do context 'group has a project' do
......
...@@ -9,7 +9,7 @@ feature 'Group name toggle', feature: true, js: true do ...@@ -9,7 +9,7 @@ feature 'Group name toggle', feature: true, js: true do
SMALL_SCREEN = 300 SMALL_SCREEN = 300
before do before do
login_as :user gitlab_sign_in :user
end end
it 'is not present if enough horizontal space' do it 'is not present if enough horizontal space' do
......
...@@ -6,7 +6,7 @@ feature 'Edit group settings', feature: true do ...@@ -6,7 +6,7 @@ feature 'Edit group settings', feature: true do
background do background do
group.add_owner(user) group.add_owner(user)
login_as(user) gitlab_sign_in(user)
end end
describe 'when the group path is changed' do describe 'when the group path is changed' do
......
...@@ -7,7 +7,7 @@ feature 'Edit group label', feature: true do ...@@ -7,7 +7,7 @@ feature 'Edit group label', feature: true do
background do background do
group.add_owner(user) group.add_owner(user)
login_as(user) gitlab_sign_in(user)
visit edit_group_label_path(group, label) visit edit_group_label_path(group, label)
end end
......
...@@ -6,7 +6,7 @@ feature 'Groups > Members > Last owner cannot leave group', feature: true do ...@@ -6,7 +6,7 @@ feature 'Groups > Members > Last owner cannot leave group', feature: true do
background do background do
group.add_owner(owner) group.add_owner(owner)
login_as(owner) gitlab_sign_in(owner)
visit group_path(group) visit group_path(group)
end end
......
...@@ -9,7 +9,7 @@ feature 'Groups members list', feature: true do ...@@ -9,7 +9,7 @@ feature 'Groups members list', feature: true do
let(:nested_group) { create(:group, parent: group) } let(:nested_group) { create(:group, parent: group) }
background do background do
login_as(user1) gitlab_sign_in(user1)
end end
scenario 'show members from current group and parent', :nested_groups do scenario 'show members from current group and parent', :nested_groups do
......
...@@ -6,7 +6,7 @@ feature 'Groups > Members > Member cannot request access to his project', featur ...@@ -6,7 +6,7 @@ feature 'Groups > Members > Member cannot request access to his project', featur
background do background do
group.add_developer(member) group.add_developer(member)
login_as(member) gitlab_sign_in(member)
visit group_path(group) visit group_path(group)
end end
......
...@@ -8,7 +8,7 @@ feature 'Groups > Members > Member leaves group', feature: true do ...@@ -8,7 +8,7 @@ feature 'Groups > Members > Member leaves group', feature: true do
background do background do
group.add_owner(owner) group.add_owner(owner)
group.add_developer(user) group.add_developer(user)
login_as(user) gitlab_sign_in(user)
visit group_path(group) visit group_path(group)
end end
......
...@@ -8,7 +8,7 @@ feature 'Groups > Members > Owner manages access requests', feature: true do ...@@ -8,7 +8,7 @@ feature 'Groups > Members > Owner manages access requests', feature: true do
background do background do
group.request_access(user) group.request_access(user)
group.add_owner(owner) group.add_owner(owner)
login_as(owner) gitlab_sign_in(owner)
end end
scenario 'owner can see access requests' do scenario 'owner can see access requests' do
......
...@@ -9,7 +9,7 @@ feature 'Groups > Members > Sorting', feature: true do ...@@ -9,7 +9,7 @@ feature 'Groups > Members > Sorting', feature: true do
create(:group_member, :owner, user: owner, group: group, created_at: 5.days.ago) create(:group_member, :owner, user: owner, group: group, created_at: 5.days.ago)
create(:group_member, :developer, user: developer, group: group, created_at: 3.days.ago) create(:group_member, :developer, user: developer, group: group, created_at: 3.days.ago)
login_as(owner) gitlab_sign_in(owner)
end end
scenario 'sorts alphabetically by default' do scenario 'sorts alphabetically by default' do
......
...@@ -8,7 +8,7 @@ feature 'Groups > Members > User requests access', feature: true do ...@@ -8,7 +8,7 @@ feature 'Groups > Members > User requests access', feature: true do
background do background do
group.add_owner(owner) group.add_owner(owner)
login_as(user) gitlab_sign_in(user)
visit group_path(group) visit group_path(group)
end end
......
...@@ -8,7 +8,7 @@ feature 'Group milestones', :feature, :js do ...@@ -8,7 +8,7 @@ feature 'Group milestones', :feature, :js do
before do before do
Timecop.freeze Timecop.freeze
login_as(user) gitlab_sign_in(user)
end end
after do after do
......
...@@ -7,7 +7,7 @@ feature 'Group show page', feature: true do ...@@ -7,7 +7,7 @@ feature 'Group show page', feature: true do
context 'when signed in' do context 'when signed in' do
before do before do
user = create(:group_member, :developer, user: create(:user), group: group ).user user = create(:group_member, :developer, user: create(:user), group: group ).user
login_as(user) gitlab_sign_in(user)
visit path visit path
end end
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
feature 'Group', feature: true do feature 'Group', feature: true do
before do before do
login_as(:admin) gitlab_sign_in(:admin)
end end
matcher :have_namespace_error_message do matcher :have_namespace_error_message do
...@@ -109,7 +109,7 @@ feature 'Group', feature: true do ...@@ -109,7 +109,7 @@ feature 'Group', feature: true do
before do before do
group.add_owner(user) group.add_owner(user)
logout logout
login_as(user) gitlab_sign_in(user)
visit subgroups_group_path(group) visit subgroups_group_path(group)
click_link 'New Subgroup' click_link 'New Subgroup'
...@@ -129,7 +129,7 @@ feature 'Group', feature: true do ...@@ -129,7 +129,7 @@ feature 'Group', feature: true do
group = create(:group, :private, path: 'secret-group') group = create(:group, :private, path: 'secret-group')
logout logout
login_as(:user) gitlab_sign_in(:user)
visit new_group_path(parent_id: group.id) visit new_group_path(parent_id: group.id)
expect(page).not_to have_content('secret-group') expect(page).not_to have_content('secret-group')
......
...@@ -40,7 +40,7 @@ describe 'Help Pages', feature: true do ...@@ -40,7 +40,7 @@ describe 'Help Pages', feature: true do
allow_any_instance_of(ApplicationSetting).to receive(:version_check_enabled) { true } allow_any_instance_of(ApplicationSetting).to receive(:version_check_enabled) { true }
allow_any_instance_of(VersionCheck).to receive(:url) { '/version-check-url' } allow_any_instance_of(VersionCheck).to receive(:url) { '/version-check-url' }
login_as :user gitlab_sign_in :user
visit help_path visit help_path
end end
...@@ -60,7 +60,7 @@ describe 'Help Pages', feature: true do ...@@ -60,7 +60,7 @@ describe 'Help Pages', feature: true do
allow_any_instance_of(ApplicationSetting).to receive(:help_page_text) { "My Custom Text" } allow_any_instance_of(ApplicationSetting).to receive(:help_page_text) { "My Custom Text" }
allow_any_instance_of(ApplicationSetting).to receive(:help_page_support_url) { "http://example.com/help" } allow_any_instance_of(ApplicationSetting).to receive(:help_page_support_url) { "http://example.com/help" }
login_as :user gitlab_sign_in(:user)
visit help_path visit help_path
end end
......
...@@ -8,7 +8,7 @@ describe 'issuable list', feature: true do ...@@ -8,7 +8,7 @@ describe 'issuable list', feature: true do
before do before do
project.add_user(user, :developer) project.add_user(user, :developer)
login_as(user) gitlab_sign_in(user)
issuable_types.each { |type| create_issuables(type) } issuable_types.each { |type| create_issuables(type) }
end end
......
...@@ -12,7 +12,7 @@ describe 'Awards Emoji', feature: true do ...@@ -12,7 +12,7 @@ describe 'Awards Emoji', feature: true do
context 'authorized user' do context 'authorized user' do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
end end
describe 'visiting an issue with a legacy award emoji that is not valid anymore' do describe 'visiting an issue with a legacy award emoji that is not valid anymore' do
......
...@@ -7,7 +7,7 @@ feature 'Issue awards', js: true, feature: true do ...@@ -7,7 +7,7 @@ feature 'Issue awards', js: true, feature: true do
describe 'logged in' do describe 'logged in' do
before do before do
login_as(user) gitlab_sign_in(user)
visit namespace_project_issue_path(project.namespace, project, issue) visit namespace_project_issue_path(project.namespace, project, issue)
wait_for_requests wait_for_requests
end end
......
...@@ -13,7 +13,7 @@ feature 'Issues > Labels bulk assignment', feature: true do ...@@ -13,7 +13,7 @@ feature 'Issues > Labels bulk assignment', feature: true do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as user gitlab_sign_in user
end end
context 'can bulk assign' do context 'can bulk assign' do
...@@ -331,7 +331,7 @@ feature 'Issues > Labels bulk assignment', feature: true do ...@@ -331,7 +331,7 @@ feature 'Issues > Labels bulk assignment', feature: true do
context 'as a guest' do context 'as a guest' do
before do before do
login_as user gitlab_sign_in user
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
end end
......
...@@ -8,7 +8,7 @@ feature 'Create Branch/Merge Request Dropdown on issue page', feature: true, js: ...@@ -8,7 +8,7 @@ feature 'Create Branch/Merge Request Dropdown on issue page', feature: true, js:
context 'for team members' do context 'for team members' do
before do before do
project.team << [user, :developer] project.team << [user, :developer]
login_as(user) gitlab_sign_in(user)
end end
it 'allows creating a merge request from the issue page' do it 'allows creating a merge request from the issue page' do
......
...@@ -9,7 +9,7 @@ feature 'Resolving all open discussions in a merge request from an issue', featu ...@@ -9,7 +9,7 @@ feature 'Resolving all open discussions in a merge request from an issue', featu
describe 'as a user with access to the project' do describe 'as a user with access to the project' do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as user gitlab_sign_in user
visit namespace_project_merge_request_path(project.namespace, project, merge_request) visit namespace_project_merge_request_path(project.namespace, project, merge_request)
end end
...@@ -82,7 +82,7 @@ feature 'Resolving all open discussions in a merge request from an issue', featu ...@@ -82,7 +82,7 @@ feature 'Resolving all open discussions in a merge request from an issue', featu
describe 'as a reporter' do describe 'as a reporter' do
before do before do
project.team << [user, :reporter] project.team << [user, :reporter]
login_as user gitlab_sign_in user
visit new_namespace_project_issue_path(project.namespace, project, merge_request_to_resolve_discussions_of: merge_request.iid) visit new_namespace_project_issue_path(project.namespace, project, merge_request_to_resolve_discussions_of: merge_request.iid)
end end
......
...@@ -9,7 +9,7 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe ...@@ -9,7 +9,7 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe
describe 'As a user with access to the project' do describe 'As a user with access to the project' do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as user gitlab_sign_in user
visit namespace_project_merge_request_path(project.namespace, project, merge_request) visit namespace_project_merge_request_path(project.namespace, project, merge_request)
end end
...@@ -66,7 +66,7 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe ...@@ -66,7 +66,7 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe
describe 'as a reporter' do describe 'as a reporter' do
before do before do
project.team << [user, :reporter] project.team << [user, :reporter]
login_as user gitlab_sign_in user
visit new_namespace_project_issue_path(project.namespace, project, visit new_namespace_project_issue_path(project.namespace, project,
merge_request_to_resolve_discussions_of: merge_request.iid, merge_request_to_resolve_discussions_of: merge_request.iid,
discussion_to_resolve: discussion.id) discussion_to_resolve: discussion.id)
......
...@@ -23,7 +23,7 @@ describe 'Dropdown assignee', :feature, :js do ...@@ -23,7 +23,7 @@ describe 'Dropdown assignee', :feature, :js do
project.team << [user, :master] project.team << [user, :master]
project.team << [user_john, :master] project.team << [user_john, :master]
project.team << [user_jacob, :master] project.team << [user_jacob, :master]
login_as(user) gitlab_sign_in(user)
create(:issue, project: project) create(:issue, project: project)
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
......
...@@ -31,7 +31,7 @@ describe 'Dropdown author', js: true, feature: true do ...@@ -31,7 +31,7 @@ describe 'Dropdown author', js: true, feature: true do
project.team << [user, :master] project.team << [user, :master]
project.team << [user_john, :master] project.team << [user_john, :master]
project.team << [user_jacob, :master] project.team << [user_jacob, :master]
login_as(user) gitlab_sign_in(user)
create(:issue, project: project) create(:issue, project: project)
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
......
...@@ -14,7 +14,7 @@ describe 'Dropdown hint', :js, :feature do ...@@ -14,7 +14,7 @@ describe 'Dropdown hint', :js, :feature do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
create(:issue, project: project) create(:issue, project: project)
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
......
...@@ -34,7 +34,7 @@ describe 'Dropdown label', js: true, feature: true do ...@@ -34,7 +34,7 @@ describe 'Dropdown label', js: true, feature: true do
before do before do
project.add_master(user) project.add_master(user)
login_as(user) gitlab_sign_in(user)
create(:issue, project: project) create(:issue, project: project)
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
......
...@@ -30,7 +30,7 @@ describe 'Dropdown milestone', :feature, :js do ...@@ -30,7 +30,7 @@ describe 'Dropdown milestone', :feature, :js do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
create(:issue, project: project) create(:issue, project: project)
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
......
...@@ -9,7 +9,7 @@ describe 'Search bar', js: true, feature: true do ...@@ -9,7 +9,7 @@ describe 'Search bar', js: true, feature: true do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
create(:issue, project: project) create(:issue, project: project)
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
......
...@@ -25,7 +25,7 @@ describe 'Visual tokens', js: true, feature: true do ...@@ -25,7 +25,7 @@ describe 'Visual tokens', js: true, feature: true do
before do before do
project.add_user(user, :master) project.add_user(user, :master)
project.add_user(user_rock, :master) project.add_user(user_rock, :master)
login_as(user) gitlab_sign_in(user)
create(:issue, project: project) create(:issue, project: project)
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
......
...@@ -16,7 +16,7 @@ describe 'New/edit issue', :feature, :js do ...@@ -16,7 +16,7 @@ describe 'New/edit issue', :feature, :js do
before do before do
project.team << [user, :master] project.team << [user, :master]
project.team << [user2, :master] project.team << [user2, :master]
login_as(user) gitlab_sign_in(user)
end end
context 'new issue' do context 'new issue' do
......
...@@ -8,7 +8,7 @@ feature 'GFM autocomplete', feature: true, js: true do ...@@ -8,7 +8,7 @@ feature 'GFM autocomplete', feature: true, js: true do
before do before do
project.team << [user, :master] project.team << [user, :master]
login_as(user) gitlab_sign_in(user)
visit namespace_project_issue_path(project.namespace, project, issue) visit namespace_project_issue_path(project.namespace, project, issue)
wait_for_requests wait_for_requests
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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