github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/tests/pages/jobs/job/clients.js (about) 1 import { 2 attribute, 3 clickable, 4 create, 5 collection, 6 fillable, 7 isPresent, 8 text, 9 visitable, 10 } from 'ember-cli-page-object'; 11 import { multiFacet } from 'nomad-ui/tests/pages/components/facet'; 12 13 import clients from 'nomad-ui/tests/pages/components/clients'; 14 import error from 'nomad-ui/tests/pages/components/error'; 15 16 export default create({ 17 visit: visitable('/jobs/:id/clients'), 18 pageSize: 25, 19 20 hasSearchBox: isPresent('[data-test-clients-search]'), 21 search: fillable('[data-test-clients-search] input'), 22 23 ...clients(), 24 25 isEmpty: isPresent('[data-test-empty-clients-list]'), 26 emptyState: { 27 headline: text('[data-test-empty-clients-list-headline]'), 28 }, 29 30 sortOptions: collection('[data-test-sort-by]', { 31 id: attribute('data-test-sort-by'), 32 sort: clickable(), 33 }), 34 35 sortBy(id) { 36 return this.sortOptions.toArray().findBy('id', id).sort(); 37 }, 38 39 facets: { 40 jobStatus: multiFacet('[data-test-job-status-facet]'), 41 datacenter: multiFacet('[data-test-datacenter-facet]'), 42 clientClass: multiFacet('[data-test-class-facet]'), 43 }, 44 45 error: error(), 46 });