Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport 'Fix autocomplete result list duplicates' to v0.26 #11893

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions decidim-core/spec/system/messaging/conversations_spec.rb
Expand Up @@ -26,6 +26,25 @@
expect(page).to have_selector("a.topbar__conversations")
end
end

context "when searching for a user group to a new conversation" do
let!(:user_group) { create(:user_group, :confirmed, name: "Example user group", nickname: "example", organization: organization) }

it "only shows one match even if the keyword matches both name and nickname" do
visit decidim.conversations_path

click_button "New conversation"

fill_in "add_conversation_users", with: "example"

expect(find(".tribute-container #results")).to have_css("li", count: 1)

within ".tribute-container #results .highlight" do
expect(page).to have_content("example")
expect(page).to have_content("Example user group")
end
end
end
end

shared_examples "create new conversation" do
Expand Down