From dd93640b2b7e10807611afc3ad2934349d2376ad Mon Sep 17 00:00:00 2001
From: Miguel Rincon <mrincon@gitlab.com>
Date: Wed, 14 Feb 2024 14:49:04 +0100
Subject: [PATCH] Use CI Icon query fragment in artifacts table

---
 .../graphql/queries/get_job_artifacts.query.graphql         | 6 ++----
 .../ci/artifacts/components/job_artifacts_table_spec.js     | 3 ++-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/app/assets/javascripts/ci/artifacts/graphql/queries/get_job_artifacts.query.graphql b/app/assets/javascripts/ci/artifacts/graphql/queries/get_job_artifacts.query.graphql
index 5737f9f8e8d3f..b09e7c57697c1 100644
--- a/app/assets/javascripts/ci/artifacts/graphql/queries/get_job_artifacts.query.graphql
+++ b/app/assets/javascripts/ci/artifacts/graphql/queries/get_job_artifacts.query.graphql
@@ -1,3 +1,4 @@
+#import "~/graphql_shared/fragments/ci_icon.fragment.graphql"
 #import "~/graphql_shared/fragments/page_info.fragment.graphql"
 
 query getJobArtifacts(
@@ -21,10 +22,7 @@ query getJobArtifacts(
         name
         webPath
         detailedStatus {
-          id
-          group
-          icon
-          label
+          ...CiIcon
         }
         pipeline {
           id
diff --git a/spec/frontend/ci/artifacts/components/job_artifacts_table_spec.js b/spec/frontend/ci/artifacts/components/job_artifacts_table_spec.js
index 36f27d1781e63..a07e410d8d21f 100644
--- a/spec/frontend/ci/artifacts/components/job_artifacts_table_spec.js
+++ b/spec/frontend/ci/artifacts/components/job_artifacts_table_spec.js
@@ -205,7 +205,8 @@ describe('JobArtifactsTable component', () => {
     it('shows the job status as an icon for a successful job', () => {
       expect(findCiIcon().props()).toMatchObject({
         status: {
-          group: 'success',
+          text: 'Passed',
+          icon: 'status_success',
         },
         showStatusText: false,
       });
-- 
GitLab