mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 05:02:28 +08:00

This PR introduces a base page object for admin pages. Since we're standardizing using components, this makes writing tests easier by abstracting away details about selectors.
20 lines
335 B
Ruby
20 lines
335 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class AdminBase < Base
|
|
def click_tab(tab_name)
|
|
header.tab(tab_name).click
|
|
end
|
|
|
|
delegate(:has_tabs?, :has_active_tab?, to: :header)
|
|
|
|
private
|
|
|
|
def header
|
|
@header ||= Components::DPageHeader.new
|
|
end
|
|
end
|
|
end
|
|
end
|