mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* Lexicographically sort location tags (#54832) Sort location tags lexicographically, fixes skipped test by providing a stable, non-time-based sort order * Update ping list snapshot
This commit is contained in:
parent
7fd3e10a0a
commit
7556436796
4 changed files with 7 additions and 15 deletions
|
@ -151,7 +151,7 @@ exports[`LocationStatusTags component renders when all locations are up 1`] = `
|
|||
<div
|
||||
class="c2"
|
||||
>
|
||||
Islamabad
|
||||
Berlin
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
|
@ -166,7 +166,7 @@ exports[`LocationStatusTags component renders when all locations are up 1`] = `
|
|||
<div
|
||||
class="euiTextColor euiTextColor--subdued"
|
||||
>
|
||||
5s ago
|
||||
5d ago
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
|
@ -190,7 +190,7 @@ exports[`LocationStatusTags component renders when all locations are up 1`] = `
|
|||
<div
|
||||
class="c2"
|
||||
>
|
||||
Berlin
|
||||
Islamabad
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
|
@ -205,7 +205,7 @@ exports[`LocationStatusTags component renders when all locations are up 1`] = `
|
|||
<div
|
||||
class="euiTextColor euiTextColor--subdued"
|
||||
>
|
||||
5d ago
|
||||
5s ago
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
|
|
|
@ -11,7 +11,7 @@ import { MonitorLocation } from '../../../../../common/runtime_types/monitor';
|
|||
import { LocationStatusTags } from '../';
|
||||
|
||||
// Failing: https://github.com/elastic/kibana/issues/54818
|
||||
describe.skip('LocationStatusTags component', () => {
|
||||
describe('LocationStatusTags component', () => {
|
||||
let monitorLocations: MonitorLocation[];
|
||||
|
||||
it('renders when there are many location', () => {
|
||||
|
|
|
@ -60,9 +60,9 @@ export const LocationStatusTags = ({ locations }: Props) => {
|
|||
}
|
||||
});
|
||||
|
||||
// Sort by recent timestamp
|
||||
// Sort lexicographically by label
|
||||
upLocations.sort((a, b) => {
|
||||
return a.timestamp < b.timestamp ? 1 : b.timestamp < a.timestamp ? -1 : 0;
|
||||
return a.label > b.label ? 1 : b.label > a.label ? -1 : 0;
|
||||
});
|
||||
|
||||
moment.locale('en', {
|
||||
|
|
|
@ -45,10 +45,6 @@ exports[`PingList component renders sorted list without errors 1`] = `
|
|||
>
|
||||
<EuiSelect
|
||||
aria-label="Status"
|
||||
compressed={false}
|
||||
fullWidth={false}
|
||||
hasNoInitialSelection={false}
|
||||
isLoading={false}
|
||||
onChange={[Function]}
|
||||
options={
|
||||
Array [
|
||||
|
@ -83,10 +79,6 @@ exports[`PingList component renders sorted list without errors 1`] = `
|
|||
>
|
||||
<EuiSelect
|
||||
aria-label="Location"
|
||||
compressed={false}
|
||||
fullWidth={false}
|
||||
hasNoInitialSelection={false}
|
||||
isLoading={false}
|
||||
onChange={[Function]}
|
||||
options={
|
||||
Array [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue