diff --git a/src/pages/RepoPage/ComponentsTab/subroute/ComponentsTable/ComponentsTable.spec.tsx b/src/pages/RepoPage/ComponentsTab/subroute/ComponentsTable/ComponentsTable.spec.tsx index 7d2b28d516..15f4375222 100644 --- a/src/pages/RepoPage/ComponentsTab/subroute/ComponentsTable/ComponentsTable.spec.tsx +++ b/src/pages/RepoPage/ComponentsTab/subroute/ComponentsTable/ComponentsTable.spec.tsx @@ -43,6 +43,7 @@ const mockedComponentMeasurements = { __typename: 'Repository', components: [ { + componentId: 'components1_id', name: 'components1', percentCovered: 93.26, percentChange: -1.56, @@ -50,6 +51,7 @@ const mockedComponentMeasurements = { measurements: [{ avg: 51.78 }, { avg: 93.356 }], }, { + componentId: 'components2_id', name: 'component2', percentCovered: 91.74, percentChange: null, @@ -58,6 +60,7 @@ const mockedComponentMeasurements = { }, { + componentId: 'testtest_id', name: 'testtest', percentCovered: 1.0, percentChange: 1.0, @@ -76,6 +79,7 @@ const mockNoReportsUploadedMeasurements = { components: [ { name: 'components1', + componentId: 'components1_id', percentCovered: null, percentChange: null, lastUploaded: null, diff --git a/src/pages/RepoPage/ComponentsTab/subroute/ComponentsTable/ComponentsTable.tsx b/src/pages/RepoPage/ComponentsTab/subroute/ComponentsTable/ComponentsTable.tsx index 5dc6d10033..4c70ad435a 100644 --- a/src/pages/RepoPage/ComponentsTab/subroute/ComponentsTable/ComponentsTable.tsx +++ b/src/pages/RepoPage/ComponentsTab/subroute/ComponentsTable/ComponentsTable.tsx @@ -124,12 +124,14 @@ function createTableData({ const data = tableData?.map( ({ + componentId, name, percentCovered, percentChange, measurements, lastUploaded, }: { + componentId: string name: string percentCovered: number | null percentChange: number | null @@ -180,7 +182,13 @@ function createTableData({