mirror of
https://github.com/discourse/discourse.git
synced 2024-12-30 21:53:56 +08:00
51a5fa036a
Some pages like new/edit item should not display admin header. New attribute called `@shouldDisplay` was added. As a proof of concept, the flags page was updated.
20 lines
394 B
Ruby
20 lines
394 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Components
|
|
class AdminHeader < PageObjects::Pages::Base
|
|
def has_tabs?(names)
|
|
expect(page.all(".admin-nav-submenu__tabs a").map(&:text)).to eq(names)
|
|
end
|
|
|
|
def visible?
|
|
has_css?(".admin-page-header")
|
|
end
|
|
|
|
def hidden?
|
|
has_no_css?(".admin-page-header")
|
|
end
|
|
end
|
|
end
|
|
end
|