2024-08-27 07:47:19 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module PageObjects
|
|
|
|
module Components
|
2024-12-18 06:13:39 +08:00
|
|
|
# TODO (martin) Delete this after plugins have been updated to use DPageHeader
|
2024-08-27 07:47:19 +08:00
|
|
|
class AdminHeader < PageObjects::Pages::Base
|
|
|
|
def has_tabs?(names)
|
2024-12-18 06:13:39 +08:00
|
|
|
expect(page.all(".d-nav-submenu__tabs a").map(&:text)).to eq(names)
|
2024-08-27 07:47:19 +08:00
|
|
|
end
|
2024-12-10 08:59:47 +08:00
|
|
|
|
|
|
|
def visible?
|
2024-12-18 06:13:39 +08:00
|
|
|
has_css?(".d-page-header")
|
2024-12-10 08:59:47 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
def hidden?
|
2024-12-18 06:13:39 +08:00
|
|
|
has_no_css?(".d-page-header")
|
2024-12-10 08:59:47 +08:00
|
|
|
end
|
2024-08-27 07:47:19 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|