github.com/hernad/nomad@v1.6.112/ui/tests/pages/components/toggle.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import { 7 attribute, 8 property, 9 clickable, 10 hasClass, 11 isPresent, 12 text, 13 } from 'ember-cli-page-object'; 14 15 export default (scope) => ({ 16 scope, 17 18 isPresent: isPresent(), 19 isDisabled: attribute('disabled', '[data-test-input]'), 20 isActive: property('checked', '[data-test-input]'), 21 22 hasDisabledClass: hasClass('is-disabled', '[data-test-label]'), 23 hasActiveClass: hasClass('is-active', '[data-test-label]'), 24 25 label: text('[data-test-label]'), 26 title: attribute('title'), 27 28 toggle: clickable('[data-test-input]'), 29 });