github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/ui/tests/pages/jobs/job/deployments.js (about) 1 import { 2 attribute, 3 clickable, 4 create, 5 collection, 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 14 export default create({ 15 visit: visitable('/jobs/:id/deployments'), 16 17 deployments: collection('[data-test-deployment]', { 18 text: text(), 19 status: text('[data-test-deployment-status]'), 20 statusClass: attribute('class', '[data-test-deployment-status]'), 21 version: text('[data-test-deployment-version]'), 22 submitTime: text('[data-test-deployment-submit-time]'), 23 promotionIsRequired: isPresent('[data-test-promotion-required]'), 24 25 toggle: clickable('[data-test-deployment-toggle-details]'), 26 27 hasDetails: isPresent('[data-test-deployment-details]'), 28 29 metrics: collection('[data-test-deployment-metric]', { 30 id: attribute('data-test-deployment-metric'), 31 text: text(), 32 }), 33 34 metricFor(id) { 35 return this.metrics.toArray().findBy('id', id); 36 }, 37 38 notification: text('[data-test-deployment-notification]'), 39 40 hasTaskGroups: isPresent('[data-test-deployment-task-groups]'), 41 taskGroups: collection('[data-test-deployment-task-group]', { 42 name: text('[data-test-deployment-task-group-name]'), 43 promotion: text('[data-test-deployment-task-group-promotion]'), 44 autoRevert: text('[data-test-deployment-task-group-auto-revert]'), 45 canaries: text('[data-test-deployment-task-group-canaries]'), 46 allocs: text('[data-test-deployment-task-group-allocs]'), 47 healthy: text('[data-test-deployment-task-group-healthy]'), 48 unhealthy: text('[data-test-deployment-task-group-unhealthy]'), 49 progress: text('[data-test-deployment-task-group-progress-deadline]'), 50 }), 51 52 ...allocations('[data-test-deployment-allocation]'), 53 hasAllocations: isPresent('[data-test-deployment-allocations]'), 54 }), 55 56 error: error(), 57 });