Skip to content
Snippets Groups Projects
Commit 4c25701d authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett
Browse files

Just assert the existence of the timeago element

parent 17fc18ec
No related branches found
No related tags found
3 merge requests!12073Add RC2 changes to 9-3-stable,!11160Fix notes_on_personal_snippets_spec,!11056WIP: Resolve "Display performance deltas between app deployments on Merge Request workflow"
Pipeline #
Loading
Loading
@@ -67,9 +67,6 @@ describe 'Comments on personal snippets', :js, feature: true do
end
 
context 'when editing a note' do
# Matches `less than a minute ago`, `about a minute ago` and `N minutes ago`
let(:timeago_regex) { /((less than|about) a minute|\d+? minutes) ago/ }
it 'changes the text' do
page.within("#notes-list li#note_#{snippet_notes[0].id}") do
click_on 'Edit comment'
Loading
Loading
@@ -81,9 +78,11 @@ describe 'Comments on personal snippets', :js, feature: true do
end
 
page.within("#notes-list li#note_#{snippet_notes[0].id}") do
edited_text = find('.edited-text')
expect(page).to have_css('.note_edited_ago')
expect(page).to have_content('new content')
expect(find('.note_edited_ago').text).to match(timeago_regex)
expect(edited_text).to have_selector('.note_edited_ago')
end
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment