github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/tests/pages/topology.js (about) 1 import { 2 attribute, 3 clickable, 4 collection, 5 create, 6 hasClass, 7 text, 8 visitable, 9 } from 'ember-cli-page-object'; 10 11 import { multiFacet } from 'nomad-ui/tests/pages/components/facet'; 12 import TopoViz from 'nomad-ui/tests/pages/components/topo-viz'; 13 import notification from 'nomad-ui/tests/pages/components/notification'; 14 15 export default create({ 16 visit: visitable('/topology'), 17 18 infoPanelTitle: text('[data-test-info-panel-title]'), 19 filteredNodesWarning: notification('[data-test-filtered-nodes-warning]'), 20 21 viz: TopoViz('[data-test-topo-viz]'), 22 23 facets: { 24 datacenter: multiFacet('[data-test-datacenter-facet]'), 25 class: multiFacet('[data-test-class-facet]'), 26 state: multiFacet('[data-test-state-facet]'), 27 version: multiFacet('[data-test-version-facet]'), 28 }, 29 30 clusterInfoPanel: { 31 scope: '[data-test-info-panel]', 32 nodeCount: text('[data-test-node-count]'), 33 allocCount: text('[data-test-alloc-count]'), 34 35 memoryProgressValue: attribute('value', '[data-test-memory-progress-bar]'), 36 memoryAbsoluteValue: text('[data-test-memory-absolute-value]'), 37 cpuProgressValue: attribute('value', '[data-test-cpu-progress-bar]'), 38 cpuAbsoluteValue: text('[data-test-cpu-absolute-value]'), 39 }, 40 41 nodeInfoPanel: { 42 scope: '[data-test-info-panel]', 43 allocations: text('[data-test-allocaions]'), 44 45 visitNode: clickable('[data-test-client-link]'), 46 47 id: text('[data-test-client-link]'), 48 name: text('[data-test-name]'), 49 address: text('[data-test-address]'), 50 status: text('[data-test-status]'), 51 52 drainingLabel: text('[data-test-draining]'), 53 drainingIsAccented: hasClass('is-info', '[data-test-draining]'), 54 55 eligibleLabel: text('[data-test-eligible]'), 56 eligibleIsAccented: hasClass('is-warning', '[data-test-eligible]'), 57 58 memoryProgressValue: attribute('value', '[data-test-memory-progress-bar]'), 59 memoryAbsoluteValue: text('[data-test-memory-absolute-value]'), 60 cpuProgressValue: attribute('value', '[data-test-cpu-progress-bar]'), 61 cpuAbsoluteValue: text('[data-test-cpu-absolute-value]'), 62 }, 63 64 allocInfoPanel: { 65 scope: '[data-test-info-panel]', 66 id: text('[data-test-id]'), 67 visitAlloc: clickable('[data-test-id]'), 68 69 siblingAllocs: text('[data-test-sibling-allocs]'), 70 uniquePlacements: text('[data-test-unique-placements]'), 71 72 job: text('[data-test-job]'), 73 visitJob: clickable('[data-test-job]'), 74 taskGroup: text('[data-test-task-group]'), 75 76 client: text('[data-test-client]'), 77 visitClient: clickable('[data-test-client]'), 78 79 charts: collection('[data-test-primary-metric]', { 80 areas: collection('[data-test-chart-area]', { 81 taskName: attribute('data-test-task-name'), 82 }), 83 }), 84 }, 85 });