github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/ui/tests/pages/jobs/list.js (about) 1 import { 2 attribute, 3 create, 4 collection, 5 clickable, 6 fillable, 7 isPresent, 8 text, 9 visitable, 10 } from 'ember-cli-page-object'; 11 12 import facet from 'nomad-ui/tests/pages/components/facet'; 13 14 export default create({ 15 pageSize: 10, 16 17 visit: visitable('/jobs'), 18 19 search: fillable('[data-test-jobs-search] input'), 20 21 runJob: clickable('[data-test-run-job]'), 22 23 jobs: collection('[data-test-job-row]', { 24 id: attribute('data-test-job-row'), 25 name: text('[data-test-job-name]'), 26 link: attribute('href', '[data-test-job-name] a'), 27 status: text('[data-test-job-status]'), 28 type: text('[data-test-job-type]'), 29 priority: text('[data-test-job-priority]'), 30 taskGroups: text('[data-test-job-task-groups]'), 31 32 clickRow: clickable(), 33 clickName: clickable('[data-test-job-name] a'), 34 }), 35 36 nextPage: clickable('[data-test-pager="next"]'), 37 prevPage: clickable('[data-test-pager="prev"]'), 38 39 isEmpty: isPresent('[data-test-empty-jobs-list]'), 40 emptyState: { 41 headline: text('[data-test-empty-jobs-list-headline]'), 42 }, 43 44 error: { 45 isPresent: isPresent('[data-test-error]'), 46 title: text('[data-test-error-title]'), 47 message: text('[data-test-error-message]'), 48 seekHelp: clickable('[data-test-error-message] a'), 49 gotoJobs: clickable('[data-test-error-jobs-link]'), 50 gotoClients: clickable('[data-test-error-clients-link]'), 51 }, 52 53 namespaceSwitcher: { 54 isPresent: isPresent('[data-test-namespace-switcher]'), 55 open: clickable('[data-test-namespace-switcher] .ember-power-select-trigger'), 56 options: collection('.ember-power-select-option', { 57 testContainer: '#ember-testing', 58 resetScope: true, 59 label: text(), 60 }), 61 }, 62 63 facets: { 64 type: facet('[data-test-type-facet]'), 65 status: facet('[data-test-status-facet]'), 66 datacenter: facet('[data-test-datacenter-facet]'), 67 prefix: facet('[data-test-prefix-facet]'), 68 }, 69 });