github.com/aminovpavel/nomad@v0.11.8/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    controllerHealthIsPresent: isPresent('[data-test-plugin-controller-health]'),
    19    controllerHealth: text('[data-test-plugin-controller-health]'),
    20    nodeHealth: text('[data-test-plugin-node-health]'),
    21    provider: text('[data-test-plugin-provider]'),
    22  
    23    controllerAvailabilityIsPresent: isPresent('[data-test-plugin-controller-availability]'),
    24    nodeAvailabilityIsPresent: isPresent('[data-test-plugin-node-availability]'),
    25  
    26    breadcrumbs: collection('[data-test-breadcrumb]', {
    27      id: attribute('data-test-breadcrumb'),
    28      text: text(),
    29      visit: clickable(),
    30    }),
    31  
    32    breadcrumbFor(id) {
    33      return this.breadcrumbs.toArray().find(crumb => crumb.id === id);
    34    },
    35  
    36    ...allocations('[data-test-controller-allocation]', 'controllerAllocations'),
    37    ...allocations('[data-test-node-allocation]', 'nodeAllocations'),
    38  
    39    goToControllerAllocations: clickable('[data-test-go-to-controller-allocations]'),
    40    goToNodeAllocations: clickable('[data-test-go-to-node-allocations]'),
    41    goToControllerAllocationsText: text('[data-test-go-to-controller-allocations]'),
    42    goToNodeAllocationsText: text('[data-test-go-to-node-allocations]'),
    43  
    44    controllerTableIsPresent: isPresent('[data-test-controller-allocations]'),
    45  
    46    controllerTableIsEmpty: isPresent('[data-test-empty-controller-allocations]'),
    47    controllerEmptyState: {
    48      headline: text('[data-test-empty-controller-allocations-headline]'),
    49    },
    50  
    51    nodeTableIsEmpty: isPresent('[data-test-empty-node-allocations]'),
    52    nodeEmptyState: {
    53      headline: text('[data-test-empty-node-allocations-headline]'),
    54    },
    55  });