github.com/hernad/nomad@v1.6.112/ui/tests/pages/components/stepper-input.js (about)

     1  /**
     2   * Copyright (c) HashiCorp, Inc.
     3   * SPDX-License-Identifier: MPL-2.0
     4   */
     5  
     6  import {
     7    attribute,
     8    blurrable,
     9    clickable,
    10    fillable,
    11    focusable,
    12    isPresent,
    13    text,
    14    triggerable,
    15    value,
    16  } from 'ember-cli-page-object';
    17  
    18  export default (scope) => ({
    19    scope,
    20  
    21    label: text('[data-test-stepper-label]'),
    22    clickLabel: clickable('[data-test-stepper-label]'),
    23  
    24    input: {
    25      scope: '[data-test-stepper-input]',
    26      fill: fillable(),
    27      focus: focusable(),
    28      blur: blurrable(),
    29      value: value(),
    30      esc: triggerable('keyup', '', { eventProperties: { keyCode: 27 } }),
    31      isDisabled: attribute('disabled'),
    32    },
    33  
    34    decrement: {
    35      scope: '[data-test-stepper-decrement]',
    36      click: clickable(),
    37      isPresent: isPresent(),
    38      isDisabled: attribute('disabled'),
    39      classNames: attribute('class'),
    40    },
    41  
    42    increment: {
    43      scope: '[data-test-stepper-increment]',
    44      click: clickable(),
    45      isPresent: isPresent(),
    46      isDisabled: attribute('disabled'),
    47      classNames: attribute('class'),
    48    },
    49  });