diff --git a/spec/features/form/accessible_autocomplete_spec.rb b/spec/features/form/accessible_autocomplete_spec.rb index e948056b4..309b732bf 100644 --- a/spec/features/form/accessible_autocomplete_spec.rb +++ b/spec/features/form/accessible_autocomplete_spec.rb @@ -76,7 +76,8 @@ RSpec.describe "Accessible Automcomplete" do it "displays appended text next to the options", js: true do find("#case-log-scheme-id-field").click.native.send_keys("w", "6", :down, :enter) - expect(find(".autocomplete__option__append", visible: :hidden, text: /(2 locations)/)).to be_present + expect(find(".autocomplete__option__append", visible: :hidden, text: scheme.service_name)).to be_present + expect(find("span", visible: :hidden, text: /(2 locations)/)).to be_present end it "displays hint text under the options", js: true do