Skip to content

Instantly share code, notes, and snippets.

@Robdel12
Last active October 28, 2018 21:48
Show Gist options
  • Save Robdel12/25884a6d21c995086bf52ca76c794239 to your computer and use it in GitHub Desktop.
Save Robdel12/25884a6d21c995086bf52ca76c794239 to your computer and use it in GitHub Desktop.
import Interactor, { is, focusable } from '@bigtest/interactor';
@Interactor.extend
class CheckboxInteractor {
hasFocus = is("input", ":focus");
focusCheckbox = focusable("input");
}
// You can use `@bigtest/interactor` without a
// decorator by passing a POJO to `Interactor.from`
// https://www.bigtestjs.io/docs/interactor/#/Interactor.from
const CheckboxInteractor = Interactor.from({
hasFocus: is("input", ":focus"),
focusCheckbox: focusable("input")
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment