open-nomad/ui/tests/pages/components/toggle.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
532 B
JavaScript
Raw Normal View History

2021-12-28 16:08:12 +00:00
import {
attribute,
property,
clickable,
hasClass,
isPresent,
text,
} from 'ember-cli-page-object';
2021-12-28 14:45:20 +00:00
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]'),
});