This will help search engines know these links point to external sites and it'll make it possible to style these links using the `[rel~=external]` selector. AFAIK, assistive techonologies don't use this attribute to notify people about external links, though.
17 lines
480 B
Ruby
17 lines
480 B
Ruby
require "rails_helper"
|
|
|
|
describe Layout::FooterComponent do
|
|
describe "description links" do
|
|
it "generates links that open in the same tab" do
|
|
render_inline Layout::FooterComponent.new
|
|
|
|
page.find(".info") do |info|
|
|
expect(info).to have_css "a", count: 2
|
|
expect(info).to have_css "a[rel~=nofollow]", count: 2
|
|
expect(info).to have_css "a[rel~=external]", count: 2
|
|
expect(info).not_to have_css "a[target]"
|
|
end
|
|
end
|
|
end
|
|
end
|