2018-07-11 02:20:02 +00:00
|
|
|
import {
|
|
|
|
attribute,
|
|
|
|
create,
|
|
|
|
collection,
|
|
|
|
clickable,
|
|
|
|
isPresent,
|
|
|
|
text,
|
|
|
|
visitable,
|
|
|
|
} from 'ember-cli-page-object';
|
|
|
|
|
2018-07-24 03:13:16 +00:00
|
|
|
import allocations from 'nomad-ui/tests/pages/components/allocations';
|
|
|
|
|
2018-07-11 02:20:02 +00:00
|
|
|
export default create({
|
|
|
|
visit: visitable('/jobs/:id'),
|
|
|
|
|
|
|
|
tabs: collection('[data-test-tab]', {
|
|
|
|
id: attribute('data-test-tab'),
|
|
|
|
visit: clickable('a'),
|
|
|
|
}),
|
|
|
|
|
|
|
|
tabFor(id) {
|
|
|
|
return this.tabs.toArray().findBy('id', id);
|
|
|
|
},
|
|
|
|
|
|
|
|
stats: collection('[data-test-job-stat]', {
|
|
|
|
id: attribute('data-test-job-stat'),
|
|
|
|
text: text(),
|
|
|
|
}),
|
|
|
|
|
|
|
|
statFor(id) {
|
|
|
|
return this.stats.toArray().findBy('id', id);
|
|
|
|
},
|
|
|
|
|
2018-07-24 03:13:16 +00:00
|
|
|
...allocations(),
|
|
|
|
|
|
|
|
viewAllAllocations: text('[data-test-view-all-allocations]'),
|
|
|
|
|
2018-07-11 02:20:02 +00:00
|
|
|
error: {
|
|
|
|
isPresent: isPresent('[data-test-error]'),
|
|
|
|
title: text('[data-test-error-title]'),
|
|
|
|
message: text('[data-test-error-message]'),
|
|
|
|
seekHelp: clickable('[data-test-error-message] a'),
|
|
|
|
},
|
2018-07-24 03:13:16 +00:00
|
|
|
|
|
|
|
recentAllocationsEmptyState: {
|
|
|
|
headline: text('[data-test-empty-recent-allocations-headline]'),
|
|
|
|
},
|
2018-07-11 02:20:02 +00:00
|
|
|
});
|