Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-07 21:09:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-07 21:09:24 +0300
commit139d707cfeb007f3cf30f39a38deb0eec6817a47 (patch)
tree6f0e6cb1fe56160656f3dc2c74163ae79ad73715 /spec/features
parenta93bf027c2619af8c11b030414c339346f13ead6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/clusters/installing_applications_shared_examples.rb15
-rw-r--r--spec/features/projects/show/user_sees_git_instructions_spec.rb21
2 files changed, 29 insertions, 7 deletions
diff --git a/spec/features/clusters/installing_applications_shared_examples.rb b/spec/features/clusters/installing_applications_shared_examples.rb
index d2f28f5b219..263877f3849 100644
--- a/spec/features/clusters/installing_applications_shared_examples.rb
+++ b/spec/features/clusters/installing_applications_shared_examples.rb
@@ -2,6 +2,9 @@
RSpec.shared_examples "installing applications for a cluster" do |managed_apps_local_tiller|
before do
+ # Reduce interval from 10 seconds which is too long for an automated test
+ stub_const("#{Clusters::ClustersController}::STATUS_POLLING_INTERVAL", 500)
+
stub_feature_flags(managed_apps_local_tiller: managed_apps_local_tiller)
visit cluster_path
@@ -107,10 +110,6 @@ RSpec.shared_examples "installing applications for a cluster" do |managed_apps_l
end
describe 'when user clicks install button' do
- def domainname_form_value
- page.find('.js-knative-domainname').value
- end
-
before do
allow(ClusterInstallAppWorker).to receive(:perform_async)
allow(ClusterWaitForIngressIpAddressWorker).to receive(:perform_in)
@@ -135,7 +134,7 @@ RSpec.shared_examples "installing applications for a cluster" do |managed_apps_l
it 'shows status transition' do
page.within('.js-cluster-application-row-knative') do
- expect(domainname_form_value).to eq('domain.example.org')
+ expect(page).to have_field('Knative Domain Name:', with: 'domain.example.org')
expect(page).to have_css('.js-cluster-application-uninstall-button', exact_text: 'Uninstall')
end
@@ -147,7 +146,7 @@ RSpec.shared_examples "installing applications for a cluster" do |managed_apps_l
page.within('.js-cluster-application-row-knative') do
expect(ClusterPatchAppWorker).to receive(:perform_async)
- expect(domainname_form_value).to eq('domain.example.org')
+ expect(page).to have_field('Knative Domain Name:', with: 'domain.example.org')
page.find('.js-knative-domainname').set("new.domain.example.org")
@@ -155,7 +154,7 @@ RSpec.shared_examples "installing applications for a cluster" do |managed_apps_l
wait_for_requests
- expect(domainname_form_value).to eq('new.domain.example.org')
+ expect(page).to have_field('Knative Domain Name:', with: 'new.domain.example.org')
end
end
end
@@ -173,6 +172,8 @@ RSpec.shared_examples "installing applications for a cluster" do |managed_apps_l
page.within('.js-cluster-application-row-cert_manager') do
click_button 'Install'
end
+
+ wait_for_requests
end
it 'shows status transition' do
diff --git a/spec/features/projects/show/user_sees_git_instructions_spec.rb b/spec/features/projects/show/user_sees_git_instructions_spec.rb
index a35f6420bdc..f7f1d7e81d6 100644
--- a/spec/features/projects/show/user_sees_git_instructions_spec.rb
+++ b/spec/features/projects/show/user_sees_git_instructions_spec.rb
@@ -18,6 +18,8 @@ RSpec.describe 'Projects > Show > User sees Git instructions' do
page.within '.empty-wrapper' do
expect(page).to have_content('Command line instructions')
end
+
+ expect(page).to have_content("git push -u origin master")
end
end
@@ -59,6 +61,25 @@ RSpec.describe 'Projects > Show > User sees Git instructions' do
include_examples 'shows details of empty project with no repo'
end
+ context ":default_branch_name is specified" do
+ let_it_be(:project) { create(:project, :public) }
+
+ before do
+ expect(Gitlab::CurrentSettings)
+ .to receive(:default_branch_name)
+ .and_return('example_branch')
+
+ sign_in(project.owner)
+ visit project_path(project)
+ end
+
+ it "recommends default_branch_name instead of master" do
+ click_link 'Create empty repository'
+
+ expect(page).to have_content("git push -u origin example_branch")
+ end
+ end
+
context 'when project is empty' do
let_it_be(:project) { create(:project_empty_repo, :public) }