open-nomad/ui/tests/pages/components/toggle.js
Buck Doyle 31b4ed7a6d
Add DAS UI code from enterprise (#9192)
This is a few combined iterations on the DAS feature.
2020-10-29 07:46:42 -05:00

18 lines
517 B
JavaScript

import { attribute, property, clickable, hasClass, isPresent, text } from 'ember-cli-page-object';
export default scope => ({
scope,
isPresent: isPresent(),
isDisabled: attribute('disabled', '[data-test-input]'),
isActive: property('checked', '[data-test-input]'),
hasDisabledClass: hasClass('is-disabled', '[data-test-label]'),
hasActiveClass: hasClass('is-active', '[data-test-label]'),
label: text('[data-test-label]'),
title: attribute('title'),
toggle: clickable('[data-test-input]'),
});