open-consul/ui-v2/tests/acceptance/dc/services/sorting.feature
John Cowen 43b320be44 ui: Add ability to sort service based on health (#7989)
* ui: Add ability to sort service based on health

* ui: Move custom sorting to sort/comparator Service/Helper (like search)

This moves custom sorting to use the same pattern as custom searching.

* Remove old Controller based comparator
2020-06-03 16:46:57 +00:00

86 lines
1.8 KiB
Gherkin

@setupApplicationTest
Feature: dc / services / sorting
Scenario:
Given 1 datacenter model with the value "dc-1"
And 6 service models from yaml
---
- Name: Service-A
Kind: ~
ChecksPassing: 1
ChecksWarning: 1
ChecksCritical: 3
- Name: Service-B
Kind: ~
ChecksPassing: 1
ChecksWarning: 1
ChecksCritical: 5
- Name: Service-C
Kind: ~
ChecksPassing: 1
ChecksWarning: 1
ChecksCritical: 4
- Name: Service-D
Kind: ~
ChecksPassing: 1
ChecksWarning: 5
ChecksCritical: 1
- Name: Service-E
Kind: ~
ChecksPassing: 1
ChecksWarning: 3
ChecksCritical: 1
- Name: Service-F
Kind: ~
ChecksPassing: 1
ChecksWarning: 4
ChecksCritical: 1
---
When I visit the services page for yaml
---
dc: dc-1
---
When I click selected on the sort
When I click options.1.button on the sort
Then I see name on the services vertically like yaml
---
- Service-F
- Service-E
- Service-D
- Service-C
- Service-B
- Service-A
---
When I click selected on the sort
When I click options.0.button on the sort
Then I see name on the services vertically like yaml
---
- Service-A
- Service-B
- Service-C
- Service-D
- Service-E
- Service-F
---
When I click selected on the sort
When I click options.2.button on the sort
Then I see name on the services vertically like yaml
---
- Service-B
- Service-C
- Service-A
- Service-D
- Service-F
- Service-E
---
When I click selected on the sort
When I click options.3.button on the sort
Then I see name on the services vertically like yaml
---
- Service-E
- Service-F
- Service-D
- Service-A
- Service-C
- Service-B
---