github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/ui/tests/pages/storage/plugins/detail.js (about)

     1  import {
     2    attribute,
     3    clickable,
     4    collection,
     5    create,
     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('/csi/plugins/:id'),
    15  
    16    title: text('[data-test-title]'),
    17  
    18    controllerHealth: text('[data-test-plugin-controller-health]'),
    19    nodeHealth: text('[data-test-plugin-node-health]'),
    20    provider: text('[data-test-plugin-provider]'),
    21  
    22    breadcrumbs: collection('[data-test-breadcrumb]', {
    23      id: attribute('data-test-breadcrumb'),
    24      text: text(),
    25      visit: clickable(),
    26    }),
    27  
    28    breadcrumbFor(id) {
    29      return this.breadcrumbs.toArray().find(crumb => crumb.id === id);
    30    },
    31  
    32    ...allocations('[data-test-controller-allocation]', 'controllerAllocations'),
    33    ...allocations('[data-test-node-allocation]', 'nodeAllocations'),
    34  
    35    controllerTableIsEmpty: isPresent('[data-test-empty-controller-allocations]'),
    36    controllerEmptyState: {
    37      headline: text('[data-test-empty-controller-allocations-headline]'),
    38    },
    39  
    40    nodeTableIsEmpty: isPresent('[data-test-empty-node-allocations]'),
    41    nodeEmptyState: {
    42      headline: text('[data-test-empty-node-allocations-headline]'),
    43    },
    44  });