github.com/hernad/nomad@v1.6.112/ui/tests/pages/jobs/job/allocations.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import { 7 attribute, 8 clickable, 9 create, 10 collection, 11 fillable, 12 isPresent, 13 text, 14 visitable, 15 } from 'ember-cli-page-object'; 16 17 import allocations from 'nomad-ui/tests/pages/components/allocations'; 18 import error from 'nomad-ui/tests/pages/components/error'; 19 import { multiFacet } from 'nomad-ui/tests/pages/components/facet'; 20 21 export default create({ 22 visit: visitable('/jobs/:id/allocations'), 23 24 pageSize: 25, 25 26 hasSearchBox: isPresent('[data-test-allocations-search]'), 27 search: fillable('[data-test-allocations-search] input'), 28 29 ...allocations(), 30 31 facets: { 32 status: multiFacet('[data-test-allocation-status-facet]'), 33 client: multiFacet('[data-test-allocation-client-facet]'), 34 taskGroup: multiFacet('[data-test-allocation-task-group-facet]'), 35 }, 36 37 isEmpty: isPresent('[data-test-empty-allocations-list]'), 38 emptyState: { 39 headline: text('[data-test-empty-allocations-list-headline]'), 40 }, 41 42 sortOptions: collection('[data-test-sort-by]', { 43 id: attribute('data-test-sort-by'), 44 sort: clickable(), 45 }), 46 47 sortBy(id) { 48 return this.sortOptions.toArray().findBy('id', id).sort(); 49 }, 50 51 error: error(), 52 });