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
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-21 18:21:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-21 18:21:10 +0300
commite33f87ac0fabaab468ce4b457996cc0f1b1bb648 (patch)
tree8bf0de72a9acac014cfdaddab7d463b208294af2 /qa
parent5baf990db20a75078684702782c24399ef9eb0fa (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb40
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb8
-rw-r--r--qa/qa/vendor/jenkins/page/configure_job.rb15
-rw-r--r--qa/qa/vendor/jenkins/page/last_job_console.rb18
5 files changed, 65 insertions, 18 deletions
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb
new file mode 100644
index 00000000000..3727aae2270
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb
@@ -0,0 +1,40 @@
+# frozen_string_literal: true
+
+require 'securerandom'
+
+module QA
+ context 'Plan', :reliable do
+ describe 'Issues list' do
+ let(:project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = 'project-to-test-export-issues-as-csv'
+ end
+ end
+
+ before do
+ Flow::Login.sign_in
+
+ 2.times do
+ Resource::Issue.fabricate_via_api! do |issue|
+ issue.project = project
+ end
+ end
+
+ project.visit!
+ Page::Project::Menu.perform(&:click_issues)
+ end
+
+ it 'successfully exports issues list as CSV' do
+ Page::Project::Issue::Index.perform do |index|
+ index.click_export_as_csv_button
+
+ expect(index.export_issues_modal).to have_content('2 issues selected')
+
+ index.click_export_issues_button
+
+ expect(index).to have_content(/Your CSV export has started. It will be emailed to (\S+) when complete./)
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb b/qa/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb
index dfcbf4b44c8..d38b8560a38 100644
--- a/qa/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- context 'Create', :smoke do
+ context 'Create', :smoke, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/215031', type: :investigating } do
describe 'Snippet creation' do
it 'User creates a snippet' do
Flow::Login.sign_in
diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
index f7a6c8411db..f05634bc3c8 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
@@ -10,14 +10,6 @@ module QA
end
end
- before(:all) do
- Runtime::Feature.enable_and_verify('new_variables_ui')
- end
-
- after(:all) do
- Runtime::Feature.remove('new_variables_ui')
- end
-
before do
Flow::Login.sign_in
add_ci_variable
diff --git a/qa/qa/vendor/jenkins/page/configure_job.rb b/qa/qa/vendor/jenkins/page/configure_job.rb
index 56a2602a003..471567ec828 100644
--- a/qa/qa/vendor/jenkins/page/configure_job.rb
+++ b/qa/qa/vendor/jenkins/page/configure_job.rb
@@ -9,16 +9,19 @@ module QA
class ConfigureJob < Page::Base
attr_accessor :job_name
- def initialize
- @path = "/job/#{@job_name}/configure"
+ def path
+ "/job/#{@job_name}/configure"
end
def configure(scm_url:)
set_git_source_code_management_url(scm_url)
click_build_when_change_is_pushed_to_gitlab
set_publish_status_to_gitlab
- click_save
- wait_for_configuration_to_save
+
+ Support::Retrier.retry_until(sleep_interval: 0.5) do
+ click_save
+ wait_for_configuration_to_save
+ end
end
private
@@ -58,8 +61,8 @@ module QA
end
def wait_for_configuration_to_save
- QA::Support::Waiter.wait_until(sleep_interval: 1.0) do
- !page.current_url.include?(@path)
+ QA::Support::Waiter.wait_until(max_duration: 10, raise_on_failure: false) do
+ !page.current_url.include?(path)
end
end
end
diff --git a/qa/qa/vendor/jenkins/page/last_job_console.rb b/qa/qa/vendor/jenkins/page/last_job_console.rb
index f41b91c2cdb..9fcbb8ab956 100644
--- a/qa/qa/vendor/jenkins/page/last_job_console.rb
+++ b/qa/qa/vendor/jenkins/page/last_job_console.rb
@@ -9,6 +9,8 @@ module QA
class LastJobConsole < Page::Base
attr_accessor :job_name
+ CONSOLE_OUTPUT_SELECTOR = '.console-output'
+
def path
"/job/#{@job_name}/lastBuild/console"
end
@@ -17,13 +19,23 @@ module QA
# Retry on errors such as:
# Selenium::WebDriver::Error::JavascriptError:
# javascript error: this.each is not a function
- Support::Retrier.retry_on_exception(reload_page: page) do
- page.has_text?('Finished: SUCCESS')
+ Support::Retrier.retry_on_exception(reload_page: page, sleep_interval: 1) do
+ has_console_output? && console_output.include?('Finished: SUCCESS')
end
end
def no_failed_status_update?
- page.has_no_text?('Failed to update Gitlab commit status')
+ !console_output.include?('Failed to update Gitlab commit status')
+ end
+
+ private
+
+ def has_console_output?
+ page.has_selector?(CONSOLE_OUTPUT_SELECTOR, wait: 1)
+ end
+
+ def console_output
+ page.find(CONSOLE_OUTPUT_SELECTOR).text
end
end
end