github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/tests/pages/components/toggle.js (about)

     1  import {
     2    attribute,
     3    property,
     4    clickable,
     5    hasClass,
     6    isPresent,
     7    text,
     8  } from 'ember-cli-page-object';
     9  
    10  export default (scope) => ({
    11    scope,
    12  
    13    isPresent: isPresent(),
    14    isDisabled: attribute('disabled', '[data-test-input]'),
    15    isActive: property('checked', '[data-test-input]'),
    16  
    17    hasDisabledClass: hasClass('is-disabled', '[data-test-label]'),
    18    hasActiveClass: hasClass('is-active', '[data-test-label]'),
    19  
    20    label: text('[data-test-label]'),
    21    title: attribute('title'),
    22  
    23    toggle: clickable('[data-test-input]'),
    24  });