From b689ddd9b6d7ebed2f4d014a77ee223df2d3491b Mon Sep 17 00:00:00 2001 From: Heinrich Lee Yu Date: Wed, 7 Aug 2019 15:45:23 +0000 Subject: Do not persist notes filter when auto-switching Send a `persist_filter: false` param to backend when opening links to notes and auto-switching to show all notes --- spec/features/user_opens_link_to_comment_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/features/user_opens_link_to_comment_spec.rb') diff --git a/spec/features/user_opens_link_to_comment_spec.rb b/spec/features/user_opens_link_to_comment_spec.rb index f1e07e55799..9533a4fe40d 100644 --- a/spec/features/user_opens_link_to_comment_spec.rb +++ b/spec/features/user_opens_link_to_comment_spec.rb @@ -18,8 +18,13 @@ describe 'User opens link to comment', :js do visit Gitlab::UrlBuilder.build(note) + wait_for_requests + expect(page.find('#discussion-filter-dropdown')).to have_content('Show all activity') expect(page).not_to have_content('Something went wrong while fetching comments') + + # Auto-switching to show all notes shouldn't be persisted + expect(user.reload.notes_filter_for(note.noteable)).to eq(UserPreference::NOTES_FILTERS[:only_activity]) end end -- cgit v1.2.1