Closed
Description
# add this to the while_loading spec, and watch it fail!
...
FactoryBot.create(:user, first_name: 'Lily', last_name: 'DaDog')
FactoryBot.create(:user, first_name: 'Coffee', last_name: 'Boxer')
...
it "while loading works with relationships" do
ReactiveRecord::Operations::Fetch.semaphore.synchronize do
mount "WhileLoadingTester", {}, no_wait: true do
class MyComponent < HyperComponent
render do
SPAN { 'loading...' }
end
end
class WhileLoadingTester < HyperComponent
render do
UL do
User.each { |user| LI { user.last_name } }
end
.while_loading 'loading...'
end
end
end
expect(page).to have_content('loading...')
expect(page).not_to have_content('DaDog', wait: 0)
end
expect(page).to have_content('DaDog')
expect(page).not_to have_content('loading...', wait: 0)
end
last line of spec fails...