discourse-custom-header-links/spec/system/viewing_custom_header_links_spec.rb
Alan Guo Xiang Tan 87404864d2
DEV: Switch to new API to render into plugin outlet (#37)
Why this change?

The renderInOutlet plugin API was introduced in Discourse core which
we will prefer to use going forward.
2023-10-11 11:33:37 +08:00

33 lines
896 B
Ruby

# frozen_string_literal: true
require_relative "page_objects/components/custom_header_link"
RSpec.describe "Viewing Custom Header Links", system: true do
fab!(:theme) { upload_theme_component }
let!(:custom_header_link) { PageObjects::Components::CustomHeaderLink.new }
it "should display the custom header links" do
visit("/")
expect(custom_header_link).to be_visible
expect(custom_header_link).to have_custom_header_link(
"External link",
href: "https://meta.discourse.org",
title: "this link will open in a new tab",
)
expect(custom_header_link).to have_custom_header_link(
"Most Liked",
href: "/latest/?order=op_likes",
title: "Posts with the most amount of likes",
)
expect(custom_header_link).to have_custom_header_link(
"Privacy",
href: "/privacy",
title: "Our Privacy Policy",
)
end
end