github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/tests/pages/jobs/job/task-group.js (about)

     1  import {
     2    clickable,
     3    create,
     4    collection,
     5    fillable,
     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  import pageSizeSelect from 'nomad-ui/tests/pages/components/page-size-select';
    14  import stepperInput from 'nomad-ui/tests/pages/components/stepper-input';
    15  import LifecycleChart from 'nomad-ui/tests/pages/components/lifecycle-chart';
    16  
    17  export default create({
    18    pageSize: 25,
    19  
    20    visit: visitable('/jobs/:id/:name'),
    21  
    22    search: fillable('.search-box input'),
    23  
    24    countStepper: stepperInput('[data-test-task-group-count-stepper]'),
    25  
    26    tasksCount: text('[data-test-task-group-tasks]'),
    27    cpu: text('[data-test-task-group-cpu]'),
    28    mem: text('[data-test-task-group-mem]'),
    29    disk: text('[data-test-task-group-disk]'),
    30  
    31    ...allocations(),
    32  
    33    isEmpty: isPresent('[data-test-empty-allocations-list]'),
    34  
    35    lifecycleChart: LifecycleChart,
    36  
    37    hasVolumes: isPresent('[data-test-volumes]'),
    38    volumes: collection('[data-test-volumes] [data-test-volume]', {
    39      name: text('[data-test-volume-name]'),
    40      type: text('[data-test-volume-type]'),
    41      source: text('[data-test-volume-source]'),
    42      permissions: text('[data-test-volume-permissions]'),
    43    }),
    44  
    45    hasScaleEvents: isPresent('[data-test-scale-events]'),
    46    scaleEvents: collection('[data-test-scale-events] [data-test-accordion-head]', {
    47      error: isPresent('[data-test-error]'),
    48      time: text('[data-test-time]'),
    49      count: text('[data-test-count]'),
    50      countIcon: { scope: '[data-test-count-icon]' },
    51      message: text('[data-test-message]'),
    52  
    53      isToggleable: isPresent('[data-test-accordion-toggle]:not(.is-invisible)'),
    54      toggle: clickable('[data-test-accordion-toggle]'),
    55    }),
    56  
    57    scaleEventBodies: collection('[data-test-scale-events] [data-test-accordion-body]', {
    58      meta: text(),
    59    }),
    60  
    61    hasScalingTimeline: isPresent('[data-test-scaling-timeline]'),
    62    scalingAnnotations: collection('[data-test-scaling-timeline] [data-test-annotation]', {
    63      open: clickable('button'),
    64    }),
    65  
    66    error: error(),
    67  
    68    emptyState: {
    69      headline: text('[data-test-empty-allocations-list-headline]'),
    70    },
    71  
    72    pageSizeSelect: pageSizeSelect(),
    73  });