Commit bf684dbd authored by Scott Hampton's avatar Scott Hampton

Migrate lastUpdatedAt to lastUpdatedOn

The backend changed the schema to be
`lastUpdatedOn` instead of `lastUpdatedAt`.
We are now updating the frontend to use that
new schema.
parent 1c777ad3
......@@ -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