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