gitlab-org--gitlab-foss/spec/features/issues/user_edits_issue_spec.rb
2018-10-19 11:35:33 +00:00

25 lines
563 B
Ruby

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:")
click_button("Preview")
end
expect(form).to have_button("Write")
end
end