aboutsummaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-07-01 21:06:30 +0200
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-07-01 21:16:50 +0200
commit3e6ae9e523b410e9f100c8840ee9b6cc77043537 (patch)
tree17bff04515631930a9849f661399ce1bfe43d03a /test/system
parent94c48771afa30e4594832dd3be4987f6ba7b6ea5 (diff)
downloadoperum-3e6ae9e523b410e9f100c8840ee9b6cc77043537.tar.gz
operum-3e6ae9e523b410e9f100c8840ee9b6cc77043537.zip
Show all searches at the top bar always
Since 8d954606eaf3 ("Do not allow to show non-shared searches"), we were only showing saved searches, but that collided with the @searches on the top bar. This went unnoticed until now, in which the top bar will always display all searches, while the shared searches content will only display the shared ones. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/shared_searches_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/system/shared_searches_test.rb b/test/system/shared_searches_test.rb
index 6828dbe..5a8cc3e 100644
--- a/test/system/shared_searches_test.rb
+++ b/test/system/shared_searches_test.rb
@@ -15,6 +15,17 @@ class SharedSearchesTest < ApplicationSystemTestCase
assert_text I18n.t('searches.shared.none')
end
+ test 'shared_searches#index shows the searches at the top bar when logged in' do
+ assert_no_text searches(:search1).name
+
+ sign_in!
+
+ find('#toggle-hidden-global-menu').click
+ click_on I18n.t('searches.shared.title').downcase
+
+ assert_text searches(:search1).name
+ end
+
test 'cannot access shared_searches#index if not logged in' do
sign_out_maybe!