consul/ui-v2/tests/pages/dc/nodes/index.js

15 lines
495 B
JavaScript
Raw Normal View History

2018-07-04 14:06:20 +00:00
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'),
};
2018-07-04 14:06:20 +00:00
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),
2018-07-04 14:06:20 +00:00
filter: filter,
};
}