github.com/hernad/nomad@v1.6.112/ui/tests/pages/jobs/job/clients.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 import { multiFacet } from 'nomad-ui/tests/pages/components/facet'; 17 18 import clients from 'nomad-ui/tests/pages/components/clients'; 19 import error from 'nomad-ui/tests/pages/components/error'; 20 21 export default create({ 22 visit: visitable('/jobs/:id/clients'), 23 pageSize: 25, 24 25 hasSearchBox: isPresent('[data-test-clients-search]'), 26 search: fillable('[data-test-clients-search] input'), 27 28 ...clients(), 29 30 isEmpty: isPresent('[data-test-empty-clients-list]'), 31 emptyState: { 32 headline: text('[data-test-empty-clients-list-headline]'), 33 }, 34 35 sortOptions: collection('[data-test-sort-by]', { 36 id: attribute('data-test-sort-by'), 37 sort: clickable(), 38 }), 39 40 sortBy(id) { 41 return this.sortOptions.toArray().findBy('id', id).sort(); 42 }, 43 44 facets: { 45 jobStatus: multiFacet('[data-test-job-status-facet]'), 46 datacenter: multiFacet('[data-test-datacenter-facet]'), 47 clientClass: multiFacet('[data-test-class-facet]'), 48 }, 49 50 error: error(), 51 });