Commit b2932eb5 authored by Mike Greiling's avatar Mike Greiling

add visible argument to helper rather than duplicating code

parent b5d5da7b
...@@ -63,8 +63,8 @@ feature 'Contributions Calendar', :js do ...@@ -63,8 +63,8 @@ feature 'Contributions Calendar', :js do
Event.create(note_comment_params) Event.create(note_comment_params)
end end
def selected_day_activities def selected_day_activities(visible: true)
find('.user-calendar-activities').text find('.user-calendar-activities', visible: visible).text
end end
before do before do
...@@ -112,7 +112,7 @@ feature 'Contributions Calendar', :js do ...@@ -112,7 +112,7 @@ feature 'Contributions Calendar', :js do
end end
it 'hides calendar day activities' do it 'hides calendar day activities' do
expect(find('.user-calendar-activities', visible: false).text).to be_empty expect(selected_day_activities(visible: false)).to be_empty
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