Skip to content

Commit a90c6c7

Browse files
committed
Address code review
1 parent 7ce793f commit a90c6c7

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

src/components/cylc/common/EstimatedTime.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2323
</template>
2424
<span
2525
v-else-if="isTruthyOrZero(estimate)"
26+
v-tooltip="{ text: tooltip, openDelay: 200 }"
2627
class="d-inline-flex align-center text-blue-grey"
2728
>
2829
{{ formatter(estimate) }}
2930
<v-icon
3031
:icon="mdiTimerSand"
3132
size="small"
3233
class="ml-1"
33-
v-tooltip="{ text: tooltip, openDelay: 200 }"
3434
/>
3535
</span>
3636
</template>

src/components/cylc/common/JobDetails.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
6767
:actual="getRunTime(node)"
6868
:estimate="meanElapsedTime"
6969
:formatter="(x) => formatDuration(x, { allowZeros: true })"
70-
tooltip="Mean"
70+
tooltip="Mean for this task"
7171
/>
7272
</td>
7373
</tr>

src/components/cylc/table/Table.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
6565
<EstimatedTime
6666
v-bind="taskRunTimes.get(item.task.id)"
6767
:formatter="(x) => formatDuration(x, { allowZeros: true })"
68-
tooltip="Mean"
68+
tooltip="Mean for this task"
6969
/>
7070
</template>
7171
<template v-slot:item.data-table-expand="{ item, internalItem, toggleExpand, isExpanded }">

tests/e2e/specs/table.cy.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,21 @@ describe('Table view', () => {
9696
.should('be.visible')
9797
})
9898
it('displays and sorts latest job run time', () => {
99+
const nonzeroValues = [
100+
'00:00:01',
101+
'00:00:01',
102+
'00:00:04',
103+
'00:00:12',
104+
'00:03:00',
105+
]
99106
// sort dt-mean ascending
100107
cy.get('.c-table')
101108
.contains('th', 'Run Time').as('dTHeader')
102109
.click()
103110
.get('tbody tr td:nth-child(10)') // 10th column
104111
.then(($cells) => {
105112
expect(Array.from($cells, (cell) => cell.innerText.trim())).to.deep.equal([
106-
'00:00:01',
107-
'00:00:01',
108-
'00:00:04',
109-
'00:00:12',
110-
'00:03:00',
113+
...nonzeroValues,
111114
'', // no value sorted after numbers
112115
'',
113116
])
@@ -118,11 +121,7 @@ describe('Table view', () => {
118121
.get('tbody tr td:nth-child(10)')
119122
.then(($cells) => {
120123
expect(Array.from($cells, (cell) => cell.innerText.trim())).to.deep.equal([
121-
'00:03:00',
122-
'00:00:12',
123-
'00:00:04',
124-
'00:00:01',
125-
'00:00:01',
124+
...nonzeroValues.slice().reverse(),
126125
'', // no value still sorted after numbers
127126
'',
128127
])

tests/unit/utils/tasks.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ describe('tasks', () => {
126126
it.each([
127127
['2022-10-05T11:56:00.000Z', '2022-10-05T11:56:00Z'],
128128
['2023-05-20T14:48-04:30', '2023-05-20T19:18:00Z'],
129+
['2023-12-04T11:38+13:25', '2023-12-03T22:13:00Z'],
129130
['2024-01-15T09:30:45.123Z', '2024-01-15T09:30:45Z'],
130131
])('%s -> %s', (input, expected) => {
131132
expect(formatDatetime(new Date(input))).toEqual(expected)

0 commit comments

Comments
 (0)