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