github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/tests/pages/topology.js (about) 1 import { attribute, clickable, create, hasClass, text, visitable } from 'ember-cli-page-object'; 2 3 import TopoViz from 'nomad-ui/tests/pages/components/topo-viz'; 4 import notification from 'nomad-ui/tests/pages/components/notification'; 5 6 export default create({ 7 visit: visitable('/topology'), 8 9 infoPanelTitle: text('[data-test-info-panel-title]'), 10 filteredNodesWarning: notification('[data-test-filtered-nodes-warning]'), 11 12 viz: TopoViz('[data-test-topo-viz]'), 13 14 clusterInfoPanel: { 15 scope: '[data-test-info-panel]', 16 nodeCount: text('[data-test-node-count]'), 17 allocCount: text('[data-test-alloc-count]'), 18 19 memoryProgressValue: attribute('value', '[data-test-memory-progress-bar]'), 20 memoryAbsoluteValue: text('[data-test-memory-absolute-value]'), 21 cpuProgressValue: attribute('value', '[data-test-cpu-progress-bar]'), 22 cpuAbsoluteValue: text('[data-test-cpu-absolute-value]'), 23 }, 24 25 nodeInfoPanel: { 26 scope: '[data-test-info-panel]', 27 allocations: text('[data-test-allocaions]'), 28 29 visitNode: clickable('[data-test-client-link]'), 30 31 id: text('[data-test-client-link]'), 32 name: text('[data-test-name]'), 33 address: text('[data-test-address]'), 34 status: text('[data-test-status]'), 35 36 drainingLabel: text('[data-test-draining]'), 37 drainingIsAccented: hasClass('is-info', '[data-test-draining]'), 38 39 eligibleLabel: text('[data-test-eligible]'), 40 eligibleIsAccented: hasClass('is-warning', '[data-test-eligible]'), 41 42 memoryProgressValue: attribute('value', '[data-test-memory-progress-bar]'), 43 memoryAbsoluteValue: text('[data-test-memory-absolute-value]'), 44 cpuProgressValue: attribute('value', '[data-test-cpu-progress-bar]'), 45 cpuAbsoluteValue: text('[data-test-cpu-absolute-value]'), 46 }, 47 48 allocInfoPanel: { 49 scope: '[data-test-info-panel]', 50 id: text('[data-test-id]'), 51 visitAlloc: clickable('[data-test-id]'), 52 53 siblingAllocs: text('[data-test-sibling-allocs]'), 54 uniquePlacements: text('[data-test-unique-placements]'), 55 56 job: text('[data-test-job]'), 57 visitJob: clickable('[data-test-job]'), 58 taskGroup: text('[data-test-task-group]'), 59 60 client: text('[data-test-client]'), 61 visitClient: clickable('[data-test-client]'), 62 }, 63 });