Skip to content

Commit

Permalink
Update viewing_brand_header_spec.rb
Browse files Browse the repository at this point in the history
the picture element won't render a broken image like previously expected from the img element in the test, so we need to add visible: :all
  • Loading branch information
awesomerobot authored Nov 15, 2024
1 parent 5935607 commit 9f166ee
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions spec/system/viewing_brand_header_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
theme.update_setting(:website_url, "http://some.url.com")
theme.update_setting(:brand_name, "some name")
theme.update_setting(:logo_url, "http://some.url.com/logo.png")
theme.update_setting(:logo_dark_url, "http://some.url.com/logo-dark.png")

theme.update_setting(
:links,
Expand All @@ -49,13 +48,8 @@
expect(page).to have_link(nil, href: "http://some.url.com")

expect(page).to have_selector(
'img#brand-logo[src="http://some.url.com/logo.png"][title="some name"]'
'img#brand-logo[title="some name"][src="http://some.url.com/logo.png"]', visible: :all
)

expect(page).to have_selector(
'img#brand-logo[src="http://some.url.com/logo-dark.png"][title="some name"]'
)


expect(page).to have_link("First Link", href: "http://some.url.com/first", target: "_blank")
expect(page).to have_link("Second Link", href: "http://some.url.com/second", target: "_self")
Expand Down

0 comments on commit 9f166ee

Please sign in to comment.