github.com/hernad/nomad@v1.6.112/ui/tests/pages/storage/volumes/list.js (about)

     1  /**
     2   * Copyright (c) HashiCorp, Inc.
     3   * SPDX-License-Identifier: MPL-2.0
     4   */
     5  
     6  import {
     7    clickable,
     8    collection,
     9    create,
    10    fillable,
    11    isPresent,
    12    text,
    13    visitable,
    14  } from 'ember-cli-page-object';
    15  
    16  import error from 'nomad-ui/tests/pages/components/error';
    17  import { singleFacet } from 'nomad-ui/tests/pages/components/facet';
    18  import pageSizeSelect from 'nomad-ui/tests/pages/components/page-size-select';
    19  
    20  export default create({
    21    pageSize: 25,
    22  
    23    visit: visitable('/csi/volumes'),
    24  
    25    search: fillable('[data-test-volumes-search] input'),
    26  
    27    volumes: collection('[data-test-volume-row]', {
    28      name: text('[data-test-volume-name]'),
    29      namespace: text('[data-test-volume-namespace]'),
    30      schedulable: text('[data-test-volume-schedulable]'),
    31      controllerHealth: text('[data-test-volume-controller-health]'),
    32      nodeHealth: text('[data-test-volume-node-health]'),
    33      provider: text('[data-test-volume-provider]'),
    34      allocations: text('[data-test-volume-allocations]'),
    35  
    36      hasNamespace: isPresent('[data-test-volume-namespace]'),
    37      clickRow: clickable(),
    38      clickName: clickable('[data-test-volume-name] a'),
    39    }),
    40  
    41    nextPage: clickable('[data-test-pager="next"]'),
    42    prevPage: clickable('[data-test-pager="prev"]'),
    43  
    44    isEmpty: isPresent('[data-test-empty-volumes-list]'),
    45    emptyState: {
    46      headline: text('[data-test-empty-volumes-list-headline]'),
    47    },
    48  
    49    error: error(),
    50    pageSizeSelect: pageSizeSelect(),
    51  
    52    facets: {
    53      namespace: singleFacet('[data-test-namespace-facet]'),
    54    },
    55  });