Center align check duration and remove extra column.
Change-Id: I38ae7fdab6294128a65de9203a6dfca9fd115899
diff --git a/gr-checks/gr-checks-item.html b/gr-checks/gr-checks-item.html
index 096408c..cf569f8 100644
--- a/gr-checks/gr-checks-item.html
+++ b/gr-checks/gr-checks-item.html
@@ -21,6 +21,9 @@
.nav-icon {
cursor: pointer;
}
+ .duration {
+ text-align: center;
+ }
</style>
<td>
<template is="dom-if" if="[[check.message]]">
@@ -34,7 +37,6 @@
<td>
<gr-checks-status show-text status="[[check.state]]" downgrade-failure-to-warning="[[false]]"></gr-checks-status>
</td>
- <td><!--Check System--></td>
<td>
<gr-date-formatter
has-tooltip
@@ -42,7 +44,7 @@
date-str="[[_startTime]]">
</gr-date-formatter>
</td>
- <td>[[_duration]]</td>
+ <td class="duration">[[_duration]]</td>
<td>
<a href$="[[check.url]]" target="_blank" class="log">
<gr-button link no-uppercase disabled="[[!check.url]]">
diff --git a/gr-checks/gr-checks-item_test.html b/gr-checks/gr-checks-item_test.html
index fc12bba..4d479bb 100644
--- a/gr-checks/gr-checks-item_test.html
+++ b/gr-checks/gr-checks-item_test.html
@@ -47,14 +47,13 @@
assert.exists(status);
});
- test('renders the run time', () => {
- const name = element.$$('td:nth-child(6)');
- assert.equal(name .textContent.trim(), '11:25:19 PM');
+ test('renders the start time', () => {
+ assert.equal(element._startTime, '2019-02-06T22:25:19.269Z');
});
suite('duration', () => {
test('renders the run duration', () => {
- const name = element.$$('td:nth-child(7)');
+ const name = element.$$('td:nth-child(6)');
assert.equal(name .textContent.trim(), '25 sec');
});
@@ -65,13 +64,13 @@
started: '2019-02-06T22:25:19.269Z',
finished: '2019-02-06T22:25:19.269Z',
};
- const name = element.$$('td:nth-child(7)');
+ const name = element.$$('td:nth-child(6)');
assert.equal(name .textContent.trim(), '0 sec');
});
});
test('renders a link to the log', () => {
- const logLink = element.$$('td:nth-child(8) > a');
+ const logLink = element.$$('td:nth-child(7) > a');
assert.equal(logLink.getAttribute('href'),
'http://example.com/test-log-url');
assert.equal(logLink.textContent.trim(), 'View log');
diff --git a/gr-checks/gr-checks-view.html b/gr-checks/gr-checks-view.html
index 9e0910d..d13ad14 100644
--- a/gr-checks/gr-checks-view.html
+++ b/gr-checks/gr-checks-view.html
@@ -163,7 +163,6 @@
<th class="topHeader">Name</th>
<th class="topHeader">For submit</th>
<th class="topHeader">Status</th>
- <th class="topHeader"><!--Checking system--></th>
<th class="topHeader">Started</th>
<th class="topHeader">Duration</th>
<th class="topHeader"><!-- actions --></th>