FIX: Show the last rendered user-tip (#29346)

…or a tip with the highest priority.

This regressed in 597ef1119536693ef0bc7fe799ff485047f9f6f7 where we got rid of `next()` calls, so we'd render the first tip we encounter.

The commit also adds a test and updates existing ones.
This commit is contained in:
Jarek Radosz
2024-10-22 22:41:29 +02:00
committed by GitHub
parent 5d1e67b3e1
commit 6a9af7c82f
4 changed files with 50 additions and 34 deletions

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
describe "Homepage", type: :system do
describe "User tips", type: :system do
fab!(:admin)
fab!(:user)
fab!(:topics) { Fabricate.times(2, :post).map(&:topic) }