BigW Consortium Gitlab

add visible argument to helper rather than duplicating code

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