From cfc792b9ca064990e6540cb742e80529ea669a81 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 10 Dec 2019 07:53:40 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/features/projects/environments/environments_spec.rb | 6 +++--- spec/features/projects/features_visibility_spec.rb | 6 ++++-- spec/features/projects/pages_lets_encrypt_spec.rb | 12 ++++++------ 3 files changed, 13 insertions(+), 11 deletions(-) (limited to 'spec/features/projects') diff --git a/spec/features/projects/environments/environments_spec.rb b/spec/features/projects/environments/environments_spec.rb index 74c2758c30f..382b5f3cac0 100644 --- a/spec/features/projects/environments/environments_spec.rb +++ b/spec/features/projects/environments/environments_spec.rb @@ -144,8 +144,8 @@ describe 'Environments page', :js do expect(page).to have_content('No deployments yet') end - it 'does not show stip button when environment is not stoppable' do - expect(page).not_to have_selector(stop_button_selector) + it 'shows stop button when environment is not stoppable' do + expect(page).to have_selector(stop_button_selector) end end @@ -205,7 +205,7 @@ describe 'Environments page', :js do end it 'shows a stop button' do - expect(page).not_to have_selector(stop_button_selector) + expect(page).to have_selector(stop_button_selector) end it 'does not show external link button' do diff --git a/spec/features/projects/features_visibility_spec.rb b/spec/features/projects/features_visibility_spec.rb index 5553e496e7a..a825911b01a 100644 --- a/spec/features/projects/features_visibility_spec.rb +++ b/spec/features/projects/features_visibility_spec.rb @@ -41,7 +41,7 @@ describe 'Edit Project Settings' do end context 'When external issue tracker is enabled and issues enabled on project settings' do - it 'does not hide issues tab' do + it 'does not hide issues tab and hides labels tab' do allow_next_instance_of(Project) do |instance| allow(instance).to receive(:external_issue_tracker).and_return(JiraService.new) end @@ -49,11 +49,12 @@ describe 'Edit Project Settings' do visit project_path(project) expect(page).to have_selector('.shortcuts-issues') + expect(page).not_to have_selector('.shortcuts-labels') end end context 'When external issue tracker is enabled and issues disabled on project settings' do - it 'hides issues tab' do + it 'hides issues tab and show labels tab' do project.issues_enabled = false project.save! allow_next_instance_of(Project) do |instance| @@ -63,6 +64,7 @@ describe 'Edit Project Settings' do visit project_path(project) expect(page).not_to have_selector('.shortcuts-issues') + expect(page).to have_selector('.shortcuts-labels') end end diff --git a/spec/features/projects/pages_lets_encrypt_spec.rb b/spec/features/projects/pages_lets_encrypt_spec.rb index d09014e915d..4f9c1903344 100644 --- a/spec/features/projects/pages_lets_encrypt_spec.rb +++ b/spec/features/projects/pages_lets_encrypt_spec.rb @@ -41,7 +41,7 @@ describe "Pages with Let's Encrypt", :https_pages_enabled do end it 'enables auto SSL and dynamically updates the form accordingly', :js do - visit edit_project_pages_domain_path(project, domain) + visit project_pages_domain_path(project, domain) expect(domain.auto_ssl_enabled).to eq false @@ -67,7 +67,7 @@ describe "Pages with Let's Encrypt", :https_pages_enabled do end it 'disables auto SSL and dynamically updates the form accordingly', :js do - visit edit_project_pages_domain_path(project, domain) + visit project_pages_domain_path(project, domain) expect(find("#pages_domain_auto_ssl_enabled", visible: false).value).to eq 'true' expect(page).not_to have_field 'Certificate (PEM)', type: 'textarea' @@ -88,7 +88,7 @@ describe "Pages with Let's Encrypt", :https_pages_enabled do shared_examples 'user sees private keys only for user provided certificate' do shared_examples 'user do not see private key' do it 'user do not see private key' do - visit edit_project_pages_domain_path(project, domain) + visit project_pages_domain_path(project, domain) expect(page).not_to have_selector '.card-header', text: 'Certificate' expect(page).not_to have_text domain.subject @@ -111,14 +111,14 @@ describe "Pages with Let's Encrypt", :https_pages_enabled do let(:domain) { create(:pages_domain, project: project, auto_ssl_enabled: false) } it 'user sees certificate subject' do - visit edit_project_pages_domain_path(project, domain) + visit project_pages_domain_path(project, domain) expect(page).to have_selector '.card-header', text: 'Certificate' expect(page).to have_text domain.subject end it 'user can delete the certificate', :js do - visit edit_project_pages_domain_path(project, domain) + visit project_pages_domain_path(project, domain) expect(page).to have_selector '.card-header', text: 'Certificate' expect(page).to have_text domain.subject @@ -139,7 +139,7 @@ describe "Pages with Let's Encrypt", :https_pages_enabled do before do stub_application_setting(lets_encrypt_terms_of_service_accepted: false) - visit edit_project_pages_domain_path(project, domain) + visit project_pages_domain_path(project, domain) end it "does not render the Let's Encrypt field", :js do -- cgit v1.2.1