-
-
Save lmiller1990/197dd1feda55495078c63981f15eb0f1 to your computer and use it in GitHub Desktop.
This file contains 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
const context = describe | |
describe('Creates a post', () => { | |
context('the post is valid', () => { | |
it('redirects to the created post', () => { | |
cy.visit('localhost:3000/posts/new') | |
cy.get('#post_title').type('my post', {force: true}) | |
cy.get('#post_body').type('this is the post body', {force: true}) | |
cy.get('#post_category_id').select('ruby', {force: true}) | |
cy.get('input[type="submit"]').click() | |
cy.get('.category').contains('Category: ruby') | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment