diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-15 21:06:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-15 21:06:14 +0000 |
commit | ae50a43c43229442e5ccef4034d62df8a3c36cbc (patch) | |
tree | 6ed44a0e6515275719e1ba744baf457fe3044793 /spec/features/projects/pages_spec.rb | |
parent | eca3cd3a9e7d9ea680086cad8150050ec8cdef3f (diff) | |
download | gitlab-ce-ae50a43c43229442e5ccef4034d62df8a3c36cbc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/projects/pages_spec.rb')
-rw-r--r-- | spec/features/projects/pages_spec.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/spec/features/projects/pages_spec.rb b/spec/features/projects/pages_spec.rb index eab0aefbe84..3c4b5b2c4ca 100644 --- a/spec/features/projects/pages_spec.rb +++ b/spec/features/projects/pages_spec.rb @@ -133,7 +133,7 @@ shared_examples 'pages settings editing' do end end - context 'when pages are exposed on external HTTPS address', :https_pages_enabled do + context 'when pages are exposed on external HTTPS address', :https_pages_enabled, :js do let(:certificate_pem) do <<~PEM -----BEGIN CERTIFICATE----- @@ -178,6 +178,11 @@ shared_examples 'pages settings editing' do visit new_project_pages_domain_path(project) fill_in 'Domain', with: 'my.test.domain.com' + + if ::Gitlab::LetsEncrypt.enabled? + find('.js-auto-ssl-toggle-container .project-feature-toggle').click + end + fill_in 'Certificate (PEM)', with: certificate_pem fill_in 'Key (PEM)', with: certificate_key click_button 'Create New Domain' @@ -202,7 +207,7 @@ shared_examples 'pages settings editing' do describe 'updating the certificate for an existing domain' do let!(:domain) do - create(:pages_domain, project: project) + create(:pages_domain, project: project, auto_ssl_enabled: false) end it 'allows the certificate to be updated' do @@ -215,7 +220,7 @@ shared_examples 'pages settings editing' do end context 'when the certificate is invalid' do - let_it_be(:domain) do + let!(:domain) do create(:pages_domain, :without_certificate, :without_key, project: project) end @@ -224,6 +229,10 @@ shared_examples 'pages settings editing' do within('#content-body') { click_link 'Edit' } + if ::Gitlab::LetsEncrypt.enabled? + find('.js-auto-ssl-toggle-container .project-feature-toggle').click + end + fill_in 'Certificate (PEM)', with: 'invalid data' click_button 'Save Changes' |