Last active
October 28, 2018 21:48
-
-
Save Robdel12/25884a6d21c995086bf52ca76c794239 to your computer and use it in GitHub Desktop.
For this blog post: https://medium.com/@robdel12/jest-bigtest-interactor-component-test-%EF%B8%8F-11b1947954c8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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