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

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