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

…or a tip with the highest priority.

This regressed in 597ef11195 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) }