Commit c2b869a1 authored by blackst0ne's avatar blackst0ne

Add specs for merge requests

parent 35160a97
...@@ -67,5 +67,23 @@ feature 'Edit Merge Request', feature: true do ...@@ -67,5 +67,23 @@ feature 'Edit Merge Request', feature: true do
def get_textarea_height def get_textarea_height
page.evaluate_script('document.getElementById("merge_request_description").offsetHeight') page.evaluate_script('document.getElementById("merge_request_description").offsetHeight')
end end
describe '"edited by" message', js: true do
context 'when merge request is updated' do
it 'shows "edited by" mesage on title update' do
fill_in 'merge_request_title', with: 'hello world'
click_button 'Save changes'
expect(page).to have_content("Edited less than a minute ago by #{user.name}")
end
it 'shows "edited by" mesage on description update' do
fill_in 'merge_request_description', with: 'hello world'
click_button 'Save changes'
expect(page).to have_content("Edited less than a minute ago by #{user.name}")
end
end
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment