diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-17 00:09:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-17 00:09:23 +0300 |
commit | 44e10d208a967d496b4602732b421c704f09201a (patch) | |
tree | 08935c08ecac2091ea19738f9495b17b34af61c7 /app | |
parent | 1eec6b22b26d09ce6927adf66f98d755a6339815 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
6 files changed, 9 insertions, 4 deletions
diff --git a/app/assets/javascripts/pipelines/components/test_reports/test_case_details.vue b/app/assets/javascripts/pipelines/components/test_reports/test_case_details.vue index 08f296bec12..2edc84e62cb 100644 --- a/app/assets/javascripts/pipelines/components/test_reports/test_case_details.vue +++ b/app/assets/javascripts/pipelines/components/test_reports/test_case_details.vue @@ -18,8 +18,6 @@ export default { testCase: { type: Object, required: true, - validator: ({ classname, formattedTime, name }) => - Boolean(classname) && Boolean(formattedTime) && Boolean(name), }, }, computed: { diff --git a/app/assets/javascripts/pipelines/stores/test_reports/getters.js b/app/assets/javascripts/pipelines/stores/test_reports/getters.js index 1685b4a846c..03680de0fa9 100644 --- a/app/assets/javascripts/pipelines/stores/test_reports/getters.js +++ b/app/assets/javascripts/pipelines/stores/test_reports/getters.js @@ -20,6 +20,8 @@ export const getSuiteTests = (state) => { return testCases .map((testCase) => ({ ...testCase, + classname: testCase.classname || '', + name: testCase.name || '', filePath: testCase.file ? `${state.blobPath}/${formatFilePath(testCase.file)}` : null, })) .map(addIconStatus) diff --git a/app/assets/javascripts/vue_shared/components/header_ci_component.vue b/app/assets/javascripts/vue_shared/components/header_ci_component.vue index c882e894e7a..80ca62a0e9b 100644 --- a/app/assets/javascripts/vue_shared/components/header_ci_component.vue +++ b/app/assets/javascripts/vue_shared/components/header_ci_component.vue @@ -105,7 +105,7 @@ export default { <section class="header-main-content"> <ci-icon-badge :status="status" /> - <strong> {{ itemName }} #{{ itemId }} </strong> + <strong data-testid="ci-header-item-text"> {{ itemName }} #{{ itemId }} </strong> <template v-if="shouldRenderTriggeredLabel">{{ __('triggered') }}</template> <template v-else>{{ __('created') }}</template> @@ -142,7 +142,7 @@ export default { </template> </section> - <section v-if="$slots.default" data-testid="headerButtons" class="gl-display-flex"> + <section v-if="$slots.default" data-testid="ci-header-action-buttons" class="gl-display-flex"> <slot></slot> </section> <gl-button diff --git a/app/finders/ci/testing/daily_build_group_report_results_finder.rb b/app/finders/ci/testing/daily_build_group_report_results_finder.rb index e12b42c24d2..70d9e55dc47 100644 --- a/app/finders/ci/testing/daily_build_group_report_results_finder.rb +++ b/app/finders/ci/testing/daily_build_group_report_results_finder.rb @@ -84,3 +84,5 @@ module Ci end end end + +Ci::Testing::DailyBuildGroupReportResultsFinder.prepend_if_ee('::EE::Ci::Testing::DailyBuildGroupReportResultsFinder') diff --git a/app/models/ci/daily_build_group_report_result.rb b/app/models/ci/daily_build_group_report_result.rb index 5a1862194f3..23c96e63724 100644 --- a/app/models/ci/daily_build_group_report_result.rb +++ b/app/models/ci/daily_build_group_report_result.rb @@ -9,12 +9,14 @@ module Ci belongs_to :last_pipeline, class_name: 'Ci::Pipeline', foreign_key: :last_pipeline_id belongs_to :project + belongs_to :group validates :data, json_schema: { filename: "daily_build_group_report_result_data" } scope :with_included_projects, -> { includes(:project) } scope :by_ref_path, -> (ref_path) { where(ref_path: ref_path) } scope :by_projects, -> (ids) { where(project_id: ids) } + scope :by_group, -> (group_id) { where(group_id: group_id) } scope :with_coverage, -> { where("(data->'coverage') IS NOT NULL") } scope :with_default_branch, -> { where(default_branch: true) } scope :by_date, -> (start_date) { where(date: report_window(start_date)..Date.current) } diff --git a/app/models/group.rb b/app/models/group.rb index ed8ce67015b..1eaa4499eb5 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -48,6 +48,7 @@ class Group < Namespace has_many :labels, class_name: 'GroupLabel' has_many :variables, class_name: 'Ci::GroupVariable' + has_many :daily_build_group_report_results, class_name: 'Ci::DailyBuildGroupReportResult' has_many :custom_attributes, class_name: 'GroupCustomAttribute' has_many :boards |