Commit aa8f7ec4 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch '218725-test-tab-dataset' into 'master'

Move test report data attributes

See merge request gitlab-org/gitlab!36125
parents 35181b11 9fb61c93
......@@ -116,17 +116,23 @@ const createPipelinesTabs = testReportsStore => {
}
};
const createTestDetails = (fullReportEndpoint, summaryEndpoint) => {
const createTestDetails = () => {
if (!window.gon?.features?.junitPipelineView) {
return;
}
const testReportsStore = createTestReportsStore({ fullReportEndpoint, summaryEndpoint });
const el = document.querySelector('#js-pipeline-tests-detail');
const { fullReportEndpoint, countEndpoint } = el?.dataset || {};
const testReportsStore = createTestReportsStore({
fullReportEndpoint,
summaryEndpoint: countEndpoint,
});
createPipelinesTabs(testReportsStore);
// eslint-disable-next-line no-new
new Vue({
el: '#js-pipeline-tests-detail',
el,
components: {
TestReports,
},
......@@ -170,6 +176,6 @@ export default () => {
createPipelinesDetailApp(mediator);
createPipelineHeaderApp(mediator);
createTestDetails(dataset.testReportEndpoint, dataset.testReportsCountEndpoint);
createTestDetails();
createDagApp();
};
......@@ -86,5 +86,5 @@
#js-pipeline-dag-vue{ data: { pipeline_data_path: dag_project_pipeline_path(@project, @pipeline), empty_svg_path: image_path('illustrations/empty-state/empty-dag-md.svg'), dag_doc_path: help_page_path('ci/yaml/README.md', anchor: 'needs')} }
#js-tab-tests.tab-pane
#js-pipeline-tests-detail
#js-pipeline-tests-detail{ data: { full_report_endpoint: test_report_project_pipeline_path(@project, @pipeline, format: :json), count_endpoint: test_reports_count_project_pipeline_path(@project, @pipeline, format: :json) } }
= render_if_exists "projects/pipelines/tabs_content", pipeline: @pipeline, project: @project
......@@ -20,6 +20,4 @@
- else
= render "projects/pipelines/with_tabs", pipeline: @pipeline
.js-pipeline-details-vue{ data: { endpoint: project_pipeline_path(@project, @pipeline, format: :json),
test_report_endpoint: test_report_project_pipeline_path(@project, @pipeline, format: :json),
test_reports_count_endpoint: test_reports_count_project_pipeline_path(@project, @pipeline, format: :json) } }
.js-pipeline-details-vue{ data: { endpoint: project_pipeline_path(@project, @pipeline, format: :json) } }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment