ember-page-object icon indicating copy to clipboard operation
ember-page-object copied to clipboard

Evaluate to see if a checkbox to see if it's checked

Open aaronlelevier opened this issue 8 years ago • 0 comments

Is there a way to use the page-object for a checkbox to see if it's checked?

I tried searching across the repo under several keywords, but couldn't find anything.

This is how my current Ember test looks for it:

find('.t-settings-modules-tickets').prop('checked')

We do use a pattern to check checkboxes using your library, but I know that it's a hack, so wanted to see if there is a better way. Currently, this is how we use the page-object to check for checkboxes being checked:

import PageObject from 'bsrs-ember/tests/page-object';

var DTDPage = PageObject.create({
  fieldRequiredTwoNotChecked: () => Ember.$('.t-dtd-field-required').is(':not(:checked)'),
  fieldRequiredTwoChecked: () => Ember.$('.t-dtd-field-required').is(':checked'),
});

Thanks in advance, Aaron

aaronlelevier avatar Jun 02 '16 17:06 aaronlelevier