spec/features/text_spec.rb in redditor-0.1.10 vs spec/features/text_spec.rb in redditor-0.1.11
- old
+ new
@@ -16,13 +16,13 @@
def save_block() find("a.redditor__update").click; end
def delete_block() find("a.redditor__delete").click; end
it "Saves text block to article", type: :feature, js: true do
add_block
- page.find(".text-block-input").set("test text block")
+ page.find("textarea").set("test text block")
submit
- expect(page.find("textarea").value).to eq "test text block"
+ expect(page).to have_content "test text block"
end
it "Shows validation error if text block content is empty", type: :feature, js: true do
add_block
submit
@@ -43,10 +43,10 @@
expect(text_value).to eq nil
end
it "Saves text block to article on save button", type: :feature, js: true do
add_block
- page.find(".text-block-input").set("test text block")
+ page.find("textarea").set("test text block")
save_block
visit_article
expect(page.find("textarea").value).to eq "test text block"
end
end
\ No newline at end of file