github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/tests/pages/jobs/job/allocations.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 12 import allocations from 'nomad-ui/tests/pages/components/allocations'; 13 import error from 'nomad-ui/tests/pages/components/error'; 14 import { multiFacet } from 'nomad-ui/tests/pages/components/facet'; 15 16 export default create({ 17 visit: visitable('/jobs/:id/allocations'), 18 19 pageSize: 25, 20 21 hasSearchBox: isPresent('[data-test-allocations-search]'), 22 search: fillable('[data-test-allocations-search] input'), 23 24 ...allocations(), 25 26 facets: { 27 status: multiFacet('[data-test-allocation-status-facet]'), 28 client: multiFacet('[data-test-allocation-client-facet]'), 29 taskGroup: multiFacet('[data-test-allocation-task-group-facet]'), 30 }, 31 32 isEmpty: isPresent('[data-test-empty-allocations-list]'), 33 emptyState: { 34 headline: text('[data-test-empty-allocations-list-headline]'), 35 }, 36 37 sortOptions: collection('[data-test-sort-by]', { 38 id: attribute('data-test-sort-by'), 39 sort: clickable(), 40 }), 41 42 sortBy(id) { 43 return this.sortOptions.toArray().findBy('id', id).sort(); 44 }, 45 46 error: error(), 47 });