open-consul/ui-v2/tests/pages/dc/nodes/index.js
John Cowen 5cf063fc8a ui: Leader icon for node listing view (#6265)
- yarn upgrade consul-api-double which includes `status/leader`
- add all the ember-data things required to call a new endpoint
- Pass the new leader variable through to the template
- use the new leader variable in the template to set a leader
- add acceptance testing to verify leaders are highlighted
- Change testing navigation/api requests to status/leader (on the node listing page, status/leader is now the last get request to
be called).
- Template whitespace commit (less indenting)
- adds a test to to assert no errors happen with an unelected leader
2019-09-04 08:35:16 +00:00

15 lines
495 B
JavaScript

export default function(visitable, clickable, attribute, collection, filter) {
const node = {
name: attribute('data-test-node'),
leader: attribute('data-test-leader', '[data-test-leader]'),
node: clickable('header a'),
};
return {
visit: visitable('/:dc/nodes'),
nodes: collection('[data-test-node]', node),
healthyNodes: collection('.healthy [data-test-node]', node),
unHealthyNodes: collection('.unhealthy [data-test-node]', node),
filter: filter,
};
}