github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/tests/pages/jobs/job/task-group.js (about) 1 import { 2 clickable, 3 create, 4 collection, 5 fillable, 6 isPresent, 7 text, 8 visitable, 9 } from 'ember-cli-page-object'; 10 11 import allocations from 'nomad-ui/tests/pages/components/allocations'; 12 import error from 'nomad-ui/tests/pages/components/error'; 13 import pageSizeSelect from 'nomad-ui/tests/pages/components/page-size-select'; 14 import stepperInput from 'nomad-ui/tests/pages/components/stepper-input'; 15 import LifecycleChart from 'nomad-ui/tests/pages/components/lifecycle-chart'; 16 import { multiFacet } from 'nomad-ui/tests/pages/components/facet'; 17 18 export default create({ 19 pageSize: 25, 20 21 visit: visitable('/jobs/:id/:name'), 22 23 search: fillable('.search-box input'), 24 25 countStepper: stepperInput('[data-test-task-group-count-stepper]'), 26 incrementButton: { scope: '[data-test-stepper-increment]' }, 27 28 tasksCount: text('[data-test-task-group-tasks]'), 29 cpu: text('[data-test-task-group-cpu]'), 30 mem: text('[data-test-task-group-mem]'), 31 disk: text('[data-test-task-group-disk]'), 32 33 ...allocations(), 34 35 isEmpty: isPresent('[data-test-empty-allocations-list]'), 36 37 facets: { 38 status: multiFacet('[data-test-allocation-status-facet]'), 39 client: multiFacet('[data-test-allocation-client-facet]'), 40 }, 41 42 lifecycleChart: LifecycleChart, 43 44 hasVolumes: isPresent('[data-test-volumes]'), 45 volumes: collection('[data-test-volumes] [data-test-volume]', { 46 name: text('[data-test-volume-name]'), 47 type: text('[data-test-volume-type]'), 48 source: text('[data-test-volume-source]'), 49 permissions: text('[data-test-volume-permissions]'), 50 }), 51 52 hasScaleEvents: isPresent('[data-test-scale-events]'), 53 scaleEvents: collection( 54 '[data-test-scale-events] [data-test-accordion-head]', 55 { 56 error: isPresent('[data-test-error]'), 57 time: text('[data-test-time]'), 58 count: text('[data-test-count]'), 59 countIcon: { scope: '[data-test-count-icon]' }, 60 message: text('[data-test-message]'), 61 62 isToggleable: isPresent( 63 '[data-test-accordion-toggle]:not(.is-invisible)' 64 ), 65 toggle: clickable('[data-test-accordion-toggle]'), 66 } 67 ), 68 69 scaleEventBodies: collection( 70 '[data-test-scale-events] [data-test-accordion-body]', 71 { 72 meta: text(), 73 } 74 ), 75 76 hasScalingTimeline: isPresent('[data-test-scaling-timeline]'), 77 scalingAnnotations: collection( 78 '[data-test-scaling-timeline] [data-test-annotation]', 79 { 80 open: clickable('button'), 81 } 82 ), 83 84 error: error(), 85 86 emptyState: { 87 headline: text('[data-test-empty-allocations-list-headline]'), 88 }, 89 90 pageSizeSelect: pageSizeSelect(), 91 });