Skip to content

Commit 1d3dd55

Browse files
committed
Fix tag update spec
1 parent f84add3 commit 1d3dd55

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

spec/system/tags/update_spec.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
before do
99
login_as(user)
1010
create(:tag_cognate, tag: tag, cognate: cognate)
11+
create(:provider)
1112
end
1213

1314
context "as an Admin" do
@@ -31,11 +32,16 @@
3132
end
3233

3334
context "when the cognate entered doesn't already exist" do
34-
it "show an error" do
35+
it "shows an error" do
3536
wait_and_visit(edit_tag_path(tag.id))
36-
enter_and_choose_tag("URTI")
3737

38-
expect(page).to have_text("Please select a tag from the list")
38+
within "div[data-controller='select-tags']" do
39+
tag_input = find(".ts-control input")
40+
tag_input.click
41+
tag_input.set("URTI")
42+
43+
expect(page).to have_css(".no-results", text: "No results found", visible: true)
44+
end
3945
end
4046
end
4147
end

0 commit comments

Comments
 (0)