class RouletteComponentPreview < ViewComponent::Preview 2 def with_spin_duration(spin_duration:) 3 render Roulettes::Roulette::Component.new(spin_duration) 4 end 5 end 1 it 'トークテーマ数を超えた回数ルーレットを実行したら選択状態をリセットする', js: true do 2 visit "/rails/view_components/roulette_component/with_spin_duration?spin_duration=0" 3 click_button 'スタート' 4 result_text = find "[data-rotate-target='resultText']" # wait: 10 を削除