Skip to content

Commit

Permalink
More reliable specs
Browse files Browse the repository at this point in the history
  • Loading branch information
ObiWanKeoni committed Jan 30, 2025
1 parent bc04386 commit 490a2e2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions spec/system/avo/has_field_discovery_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@
it "displays discovered associations correctly" do
wait_for_loaded

# Verify `posts` association
expect(page).to have_text "Posts"
expect(page).to have_text "Sample Post", wait: 5
expect(page).to have_link "Sample Post", href: "/admin/resources/posts/#{post.slug}?via_record_id=#{user.slug}&via_resource_class=Avo%3A%3AResources%3A%3AUser"
expect(page).to have_selector("#has_many_field_show_posts")
expect(page).to have_selector("#has_many_field_show_posts")
expect(page).to have_selector("#has_many_field_show_people")
expect(page).to have_selector("#has_many_field_show_spouses")
expect(page).to have_selector("#has_many_field_show_comments")
expect(page).to have_selector("#has_and_belongs_to_many_field_show_projects")
expect(page).to have_selector("#has_many_field_show_team_memberships")
expect(page).to have_selector("#has_many_field_show_teams")

# Verify `cv_attachment` association is present
expect(page).to have_text "CV"
Expand Down

0 comments on commit 490a2e2

Please sign in to comment.