Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob committed Sep 10, 2024
1 parent 71985fa commit f5d25c6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/system/avo/has_many_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,22 @@ def destroy
end
end
end

describe "duplicated field id" do
let!(:store) { create(:store) }

it "render tags and has many field" do
StorePatron.create!(user:, store:, review: "some review")
visit avo.resources_store_path(store)

# Find user name on tags field
expect(page).to have_css('div[data-field-id="patrons"] div[data-target="tag-component"]', text: user.name)

# Find user name on has many field
within("tr[data-record-id='#{user.id}']") do
expect(page).to have_text(user.first_name)
expect(page).to have_text(user.last_name)
end
end
end
end

0 comments on commit f5d25c6

Please sign in to comment.