Last active
October 28, 2018 21:47
-
-
Save Robdel12/dcca0654605f483a9626c62188c99492 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 { setupAppForTesting } from "@bigtest/react"; | |
import AppRootComponent from "../../src/index"; | |
describe("Signup acceptance test", () => { | |
let signup = new SignUpInteractor(); | |
beforeEach(async () => { | |
await setupAppForTesting(AppRootComponent); | |
}); | |
describe("filling in the form", async () => { | |
beforeEach(async () => { | |
await signup | |
.firstName.fillAndBlur("Bob") | |
.lastName.fillAndBlur("Ross") | |
.subscribeCheckbox.toggle() | |
.submitBtn.click(); | |
}); | |
it("properly submits the form", async () => { | |
// ... | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment