Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions spec/system/human_editing_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def sign_in(user)
visit sign_in_path
fill_in "Email address", with: user.email
click_button "Sign In"
expect(page).to have_current_path(root_path)
expect(page).to have_button("Menu")
end

Expand All @@ -27,12 +28,14 @@ def sign_in(user)
visit plan_path(plan)
within("#plan-toolbar") { click_link "Edit" }

expect(page).to have_current_path(edit_content_plan_path(plan))
expect(page).to have_field("content", with: /First draft body/)

fill_in "content", with: "# Editable Plan\n\nRevised body from the browser.\n"
fill_in "change_summary", with: "Browser edit"
click_button "Save new version"

expect(page).to have_current_path(plan_path(plan))
expect(page).to have_content("Plan updated.")
expect(page).to have_content("Revised body from the browser.")

Expand All @@ -56,6 +59,7 @@ def sign_in(user)
find("#plan_tag_field").send_keys("api-design", :enter)
click_button "Save new version"

expect(page).to have_current_path(plan_path(plan))
expect(page).to have_content("Plan updated.")
plan.reload
expect(plan.title).to eq("Renamed In Editor")
Expand Down
Loading