diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-08 14:06:09 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-08 14:06:09 +0300 |
commit | 4c25701dc61ab0d3182c8c19e3251431517afbb1 (patch) | |
tree | 27573934cb57b173a2c078a9084c9f07bdf9d2b0 /spec/features/snippets/notes_on_personal_snippets_spec.rb | |
parent | 17fc18ec2c04454eebd818b596e394131cb3dcc8 (diff) |
Just assert the existence of the timeago element
Diffstat (limited to 'spec/features/snippets/notes_on_personal_snippets_spec.rb')
-rw-r--r-- | spec/features/snippets/notes_on_personal_snippets_spec.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/features/snippets/notes_on_personal_snippets_spec.rb b/spec/features/snippets/notes_on_personal_snippets_spec.rb index c6ca89219bc..698eb46573f 100644 --- a/spec/features/snippets/notes_on_personal_snippets_spec.rb +++ b/spec/features/snippets/notes_on_personal_snippets_spec.rb @@ -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' @@ -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 |