Last active
October 30, 2015 14:57
-
-
Save jennifer-shehane/777850fc5fcc58d0fed8 to your computer and use it in GitHub Desktop.
before_each_err
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
describe "Questions List", -> | |
beforeEach -> | |
cy | |
.server() | |
context "layout", -> | |
beforeEach -> | |
cy | |
.route(/form_templates\/\d+$/, "fixture:form_template").as("getFormTemplate") | |
.route(/form_templates\/\d+\/question_headings/, "fixture:question_headings").as("getQuestionHeadings") | |
.route(/form_templates\/\d+\/questions/, "fixture_questions").as("getQuestions") | |
.region("#main") | |
.wait(["@getFormTemplate", "@getQuestionHeadings", "@getQuestions"]) | |
describe "question headings list", -> | |
beforeEach -> | |
cy | |
.get(".question-heading-list") | |
.find(">li:first .question-heading-wrapper").as("firstQuestionHeading") | |
context "edit question heading", -> | |
describe "successfully update [26a]", -> | |
it "PUTS name [26b]", -> | |
cy | |
.route("PUT", /question_headings\/\d+/, @questionHeading).as("putQuestionHeading") | |
.get("@firstQuestionHeading").within -> | |
cy | |
.get("[data-js='edit-question-heading']").click() | |
.get("input").type("bar").blur() | |
.wait("@putQuestionHeading").then (request) -> | |
expect(request.requestJSON).to.have.property "name" |
Author
jennifer-shehane
commented
Oct 27, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment