spec/features/video_spec.rb in redditor-0.1.12 vs spec/features/video_spec.rb in redditor-0.1.14

- old
+ new

@@ -18,17 +18,17 @@ it "Saves video block to article", type: :feature, js: true do add_block page.find(".video-block-input").set("1"*11) submit - expect(page.find("iframe").nil?).to eq false + wait_until { expect(page.find("iframe").nil?).to eq false } end it "Shows validation error if youtube block url is empty or invalid", type: :feature, js: true do add_block submit - expect(page.find(".errors")).to have_content "is the wrong length" + expect(page).to have_content "is the wrong length" end it "Deletes video block", type: :feature, js: true do article.page.video_blocks.build(youtube: "1"*11, position: 1).save visit_article @@ -37,16 +37,16 @@ video_frame = begin page.find("iframe") rescue nil end - expect(video_frame).to eq nil + wait_until { expect(video_frame).to eq nil } end it "Saves video block to article on save button", type: :feature, js: true do add_block page.find(".video-block-input").set("1"*11) save_block visit_article - expect(page.find("iframe").nil?).to eq false + wait_until { expect(page.find("iframe").nil?).to eq false } end end \ No newline at end of file