consul/ui-v2/tests/pages/dc/services/show.js

20 lines
689 B
JavaScript
Raw Normal View History

export default function(visitable, attribute, collection, text, intentions, filter, tabs) {
2018-07-04 14:06:20 +00:00
return {
visit: visitable('/:dc/services/:service'),
externalSource: attribute('data-test-external-source', '[data-test-external-source]', {
scope: '.title',
}),
dashboardAnchor: {
href: attribute('href', '[data-test-dashboard-anchor]'),
},
tabs: tabs('tab', ['instances', 'intentions', 'routing', 'tags']),
2018-07-04 14:06:20 +00:00
filter: filter,
// TODO: These need to somehow move to subpages
instances: collection('.consul-service-instance-list > ul > li:not(:first-child)', {
address: text('[data-test-address]'),
}),
intentions: intentions(),
2018-07-04 14:06:20 +00:00
};
}