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