2021-02-17 21:09:06 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe 'User searches project settings', :js do
|
|
|
|
let_it_be(:user) { create(:user) }
|
2021-03-16 18:11:53 +00:00
|
|
|
let_it_be(:project) { create(:project, :repository, namespace: user.namespace, pages_https_only: false) }
|
2021-02-17 21:09:06 +00:00
|
|
|
|
|
|
|
before do
|
2021-11-11 12:10:41 +00:00
|
|
|
stub_feature_flags(bootstrap_confirmation_modals: false)
|
2021-02-17 21:09:06 +00:00
|
|
|
sign_in(user)
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'in general settings page' do
|
2021-03-23 12:09:33 +00:00
|
|
|
before do
|
|
|
|
visit edit_project_path(project)
|
|
|
|
end
|
2021-02-17 21:09:06 +00:00
|
|
|
|
2021-03-23 12:09:33 +00:00
|
|
|
it_behaves_like 'can search settings', 'Naming', 'Visibility'
|
2021-02-17 21:09:06 +00:00
|
|
|
end
|
|
|
|
|
2021-03-16 18:11:53 +00:00
|
|
|
context 'in Integrations page' do
|
|
|
|
before do
|
|
|
|
visit project_settings_integrations_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
it_behaves_like 'can highlight results', 'third-party applications'
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'in Webhooks page' do
|
|
|
|
before do
|
|
|
|
visit project_hooks_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
it_behaves_like 'can highlight results', 'Secret token'
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'in Access Tokens page' do
|
|
|
|
before do
|
|
|
|
visit project_settings_access_tokens_path(project)
|
|
|
|
end
|
|
|
|
|
2021-06-17 12:10:02 +00:00
|
|
|
it_behaves_like 'can highlight results', 'Expiration date'
|
2021-03-16 18:11:53 +00:00
|
|
|
end
|
|
|
|
|
2021-02-17 21:09:06 +00:00
|
|
|
context 'in Repository page' do
|
|
|
|
before do
|
|
|
|
visit project_settings_repository_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
it_behaves_like 'can search settings', 'Deploy keys', 'Mirroring repositories'
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'in CI/CD page' do
|
|
|
|
before do
|
|
|
|
visit project_settings_ci_cd_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
it_behaves_like 'can search settings', 'General pipelines', 'Auto DevOps'
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'in Operations page' do
|
|
|
|
before do
|
|
|
|
visit project_settings_operations_path(project)
|
|
|
|
end
|
|
|
|
|
2021-05-21 12:10:27 +00:00
|
|
|
it_behaves_like 'can search settings', 'Alerts', 'Error tracking'
|
2021-02-17 21:09:06 +00:00
|
|
|
end
|
2021-03-16 18:11:53 +00:00
|
|
|
|
|
|
|
context 'in Pages page' do
|
|
|
|
before do
|
|
|
|
allow(Gitlab.config.pages).to receive(:enabled).and_return(true)
|
|
|
|
|
|
|
|
visit project_pages_path(project)
|
|
|
|
end
|
|
|
|
|
2021-04-08 09:09:04 +00:00
|
|
|
it_behaves_like 'can highlight results', 'static website'
|
2021-03-16 18:11:53 +00:00
|
|
|
end
|
2021-02-17 21:09:06 +00:00
|
|
|
end
|