github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/ui/tests/pages/jobs/detail.js (about) 1 import { 2 attribute, 3 create, 4 collection, 5 clickable, 6 isPresent, 7 text, 8 visitable, 9 } from 'ember-cli-page-object'; 10 11 import allocations from 'nomad-ui/tests/pages/components/allocations'; 12 13 export default create({ 14 visit: visitable('/jobs/:id'), 15 16 tabs: collection('[data-test-tab]', { 17 id: attribute('data-test-tab'), 18 visit: clickable('a'), 19 }), 20 21 tabFor(id) { 22 return this.tabs.toArray().findBy('id', id); 23 }, 24 25 stats: collection('[data-test-job-stat]', { 26 id: attribute('data-test-job-stat'), 27 text: text(), 28 }), 29 30 statFor(id) { 31 return this.stats.toArray().findBy('id', id); 32 }, 33 34 childrenSummary: isPresent('[data-test-job-summary] [data-test-children-status-bar]'), 35 allocationsSummary: isPresent('[data-test-job-summary] [data-test-allocation-status-bar]'), 36 37 ...allocations(), 38 39 viewAllAllocations: text('[data-test-view-all-allocations]'), 40 41 error: { 42 isPresent: isPresent('[data-test-error]'), 43 title: text('[data-test-error-title]'), 44 message: text('[data-test-error-message]'), 45 seekHelp: clickable('[data-test-error-message] a'), 46 }, 47 48 recentAllocationsEmptyState: { 49 headline: text('[data-test-empty-recent-allocations-headline]'), 50 }, 51 });