github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/ui/tests/pages/jobs/job/task-group.js (about)

     1  import {
     2    attribute,
     3    clickable,
     4    create,
     5    collection,
     6    fillable,
     7    isPresent,
     8    text,
     9    visitable,
    10  } from 'ember-cli-page-object';
    11  
    12  import allocations from 'nomad-ui/tests/pages/components/allocations';
    13  import error from 'nomad-ui/tests/pages/components/error';
    14  import pageSizeSelect from 'nomad-ui/tests/pages/components/page-size-select';
    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    tasksCount: text('[data-test-task-group-tasks]'),
    25    cpu: text('[data-test-task-group-cpu]'),
    26    mem: text('[data-test-task-group-mem]'),
    27    disk: text('[data-test-task-group-disk]'),
    28  
    29    breadcrumbs: collection('[data-test-breadcrumb]', {
    30      id: attribute('data-test-breadcrumb'),
    31      text: text(),
    32      visit: clickable(),
    33    }),
    34  
    35    breadcrumbFor(id) {
    36      return this.breadcrumbs.toArray().find(crumb => crumb.id === id);
    37    },
    38  
    39    ...allocations(),
    40  
    41    isEmpty: isPresent('[data-test-empty-allocations-list]'),
    42  
    43    lifecycleChart: LifecycleChart,
    44  
    45    hasVolumes: isPresent('[data-test-volumes]'),
    46    volumes: collection('[data-test-volumes] [data-test-volume]', {
    47      name: text('[data-test-volume-name]'),
    48      type: text('[data-test-volume-type]'),
    49      source: text('[data-test-volume-source]'),
    50      permissions: text('[data-test-volume-permissions]'),
    51    }),
    52  
    53    error: error(),
    54  
    55    emptyState: {
    56      headline: text('[data-test-empty-allocations-list-headline]'),
    57    },
    58  
    59    pageSizeSelect: pageSizeSelect(),
    60  });