Commit c67a1159 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'sh-update-test-coverage-schema' into 'master'

Migrate lastUpdatedAt to lastUpdatedOn

See merge request gitlab-org/gitlab!47023
parents fb70509b bf684dbd
...@@ -85,9 +85,9 @@ export default { ...@@ -85,9 +85,9 @@ export default {
sortedCoverageData() { sortedCoverageData() {
// Sort the table by most recently updated coverage report // Sort the table by most recently updated coverage report
return [...this.selectedCoverageData].sort((a, b) => { return [...this.selectedCoverageData].sort((a, b) => {
if (a.codeCoverageSummary.lastUpdatedAt > b.codeCoverageSummary.lastUpdatedAt) { if (a.codeCoverageSummary.lastUpdatedOn > b.codeCoverageSummary.lastUpdatedOn) {
return -1; return -1;
} else if (a.codeCoverageSummary.lastUpdatedAt < b.codeCoverageSummary.lastUpdatedAt) { } else if (a.codeCoverageSummary.lastUpdatedOn < b.codeCoverageSummary.lastUpdatedOn) {
return 1; return 1;
} }
return 0; return 0;
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
label: s__('RepositoriesAnalytics|Coverage Jobs'), label: s__('RepositoriesAnalytics|Coverage Jobs'),
}, },
{ {
key: 'lastUpdatedAt', key: 'lastUpdatedOn',
label: s__('RepositoriesAnalytics|Last Update'), label: s__('RepositoriesAnalytics|Last Update'),
}, },
], ],
...@@ -206,7 +206,7 @@ export default { ...@@ -206,7 +206,7 @@ export default {
<template #head(coverageCount)="data"> <template #head(coverageCount)="data">
<div>{{ data.label }}</div> <div>{{ data.label }}</div>
</template> </template>
<template #head(lastUpdatedAt)="data"> <template #head(lastUpdatedOn)="data">
<div>{{ data.label }}</div> <div>{{ data.label }}</div>
</template> </template>
...@@ -223,9 +223,9 @@ export default { ...@@ -223,9 +223,9 @@ export default {
<template #cell(coverageCount)="{ item }"> <template #cell(coverageCount)="{ item }">
<div :data-testid="`${item.id}-count`">{{ item.codeCoverageSummary.coverageCount }}</div> <div :data-testid="`${item.id}-count`">{{ item.codeCoverageSummary.coverageCount }}</div>
</template> </template>
<template #cell(lastUpdatedAt)="{ item }"> <template #cell(lastUpdatedOn)="{ item }">
<time-ago-tooltip <time-ago-tooltip
:time="item.codeCoverageSummary.lastUpdatedAt" :time="item.codeCoverageSummary.lastUpdatedOn"
:data-testid="`${item.id}-date`" :data-testid="`${item.id}-date`"
/> />
</template> </template>
......
...@@ -10,7 +10,7 @@ query getProjectsTestCoverage($projectIds: [ID!]) { ...@@ -10,7 +10,7 @@ query getProjectsTestCoverage($projectIds: [ID!]) {
codeCoverageSummary { codeCoverageSummary {
averageCoverage averageCoverage
coverageCount coverageCount
lastUpdatedAt lastUpdatedOn
} }
} }
} }
......
...@@ -120,7 +120,7 @@ describe('Test coverage table component', () => { ...@@ -120,7 +120,7 @@ describe('Test coverage table component', () => {
codeCoverageSummary: { codeCoverageSummary: {
averageCoverage, averageCoverage,
coverageCount, coverageCount,
lastUpdatedAt: yesterday.toISOString(), lastUpdatedOn: yesterday.toISOString(),
}, },
}, },
], ],
...@@ -152,7 +152,7 @@ describe('Test coverage table component', () => { ...@@ -152,7 +152,7 @@ describe('Test coverage table component', () => {
codeCoverageSummary: { codeCoverageSummary: {
averageCoverage: '1.45', averageCoverage: '1.45',
coverageCount: '1', coverageCount: '1',
lastUpdatedAt: yesterday.toISOString(), lastUpdatedOn: yesterday.toISOString(),
}, },
}, },
{ {
...@@ -164,7 +164,7 @@ describe('Test coverage table component', () => { ...@@ -164,7 +164,7 @@ describe('Test coverage table component', () => {
codeCoverageSummary: { codeCoverageSummary: {
averageCoverage: '1.45', averageCoverage: '1.45',
coverageCount: '1', coverageCount: '1',
lastUpdatedAt: today.toISOString(), lastUpdatedOn: today.toISOString(),
}, },
}, },
]; ];
...@@ -215,7 +215,7 @@ describe('Test coverage table component', () => { ...@@ -215,7 +215,7 @@ describe('Test coverage table component', () => {
codeCoverageSummary: { codeCoverageSummary: {
averageCoverage: '1.45', averageCoverage: '1.45',
coverageCount: '1', coverageCount: '1',
lastUpdatedAt: new Date().toISOString(), lastUpdatedOn: new Date().toISOString(),
}, },
}, },
], ],
......
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