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

30 lines
905 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',
'linked-services',
'upstreams',
'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(),
services: collection('.consul-gateway-services-list> ul > li:not(:first-child)', {
name: text('[data-test-service-name]'),
}),
2018-07-04 14:06:20 +00:00
};
}