github.com/hernad/nomad@v1.6.112/ui/tests/pages/allocations/task/detail.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import { 7 attribute, 8 create, 9 collection, 10 clickable, 11 isPresent, 12 text, 13 visitable, 14 } from 'ember-cli-page-object'; 15 16 import twoStepButton from 'nomad-ui/tests/pages/components/two-step-button'; 17 18 export default create({ 19 visit: visitable('/allocations/:id/:name'), 20 21 title: { 22 scope: '[data-test-title]', 23 24 proxyTag: { 25 scope: '[data-test-proxy-tag]', 26 }, 27 }, 28 29 state: text('.title [data-test-state]'), 30 startedAt: text('[data-test-started-at]'), 31 32 lifecycle: text('.pair [data-test-lifecycle]'), 33 34 restart: twoStepButton('[data-test-restart]'), 35 36 execButton: { 37 scope: '[data-test-exec-button]', 38 }, 39 40 resourceCharts: collection('[data-test-primary-metric]', { 41 name: text('[data-test-primary-metric-title]'), 42 chartClass: attribute('class', '[data-test-percentage-chart] progress'), 43 }), 44 45 resourceEmptyMessage: text('[data-test-resource-error-headline]'), 46 47 hasPrestartTasks: isPresent('[data-test-prestart-tasks]'), 48 prestartTasks: collection('[data-test-prestart-task]', { 49 name: text('[data-test-name]'), 50 state: text('[data-test-state]'), 51 lifecycle: text('[data-test-lifecycle]'), 52 isBlocking: isPresent('.icon-is-warning'), 53 }), 54 55 hasVolumes: isPresent('[data-test-volumes]'), 56 volumes: collection('[data-test-volume]', { 57 name: text('[data-test-volume-name]'), 58 destination: text('[data-test-volume-destination]'), 59 permissions: text('[data-test-volume-permissions]'), 60 clientSource: text('[data-test-volume-client-source]'), 61 }), 62 63 events: collection('[data-test-task-event]', { 64 time: text('[data-test-task-event-time]'), 65 type: text('[data-test-task-event-type]'), 66 message: text('[data-test-task-event-message]'), 67 }), 68 69 error: { 70 isPresent: isPresent('[data-test-error]'), 71 title: text('[data-test-error-title]'), 72 message: text('[data-test-error-message]'), 73 seekHelp: clickable('[data-test-error-message] a'), 74 }, 75 76 inlineError: { 77 isShown: isPresent('[data-test-inline-error]'), 78 title: text('[data-test-inline-error-title]'), 79 message: text('[data-test-inline-error-body]'), 80 dismiss: clickable('[data-test-inline-error-close]'), 81 }, 82 });