2019-07-25 01:24:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-04-03 06:27:56 -04:00
|
|
|
require "spec_helper"
|
|
|
|
|
|
|
|
describe "User edits issue", :js do
|
|
|
|
set(:project) { create(:project_empty_repo, :public) }
|
|
|
|
set(:user) { create(:user) }
|
|
|
|
set(:issue) { create(:issue, project: project, author: user) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
project.add_developer(user)
|
|
|
|
sign_in(user)
|
|
|
|
|
|
|
|
visit(edit_project_issue_path(project, issue))
|
|
|
|
end
|
|
|
|
|
|
|
|
it "previews content" do
|
|
|
|
form = first(".gfm-form")
|
|
|
|
|
|
|
|
page.within(form) do
|
|
|
|
fill_in("Description", with: "Bug fixed :smile:")
|
2018-10-19 07:35:33 -04:00
|
|
|
click_button("Preview")
|
2018-04-03 06:27:56 -04:00
|
|
|
end
|
|
|
|
|
2018-10-19 07:35:33 -04:00
|
|
|
expect(form).to have_button("Write")
|
2018-04-03 06:27:56 -04:00
|
|
|
end
|
|
|
|
end
|