I have a test feature that fails because at the time it runs some HTML elements ( <li data-podcast>
) have not yet been rendered.
Does anyone know how I can fix this?
RSpec.describe 'Podcasts List', type: :feature do
scenario 'A user visits the root page and views a podcasts list' do
visit '/'
within '[data-podcasts]' do
expect(page).to have_selector 'li[data-podcast]', minimum: 3
end
end
end