2023-11-20 06:59:04 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module PageObjects
|
|
|
|
module Pages
|
2024-08-16 07:12:24 +08:00
|
|
|
class AdminNewFeatures < PageObjects::Pages::Base
|
2023-11-20 06:59:04 +08:00
|
|
|
def visit
|
2024-08-16 07:12:24 +08:00
|
|
|
page.visit("/admin/whats-new")
|
2023-11-20 06:59:04 +08:00
|
|
|
self
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_screenshot?
|
|
|
|
page.has_css?(".admin-new-feature-item__screenshot")
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_no_screenshot?
|
|
|
|
page.has_no_css?(".admin-new-feature-item__screenshot")
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_learn_more_link?
|
|
|
|
page.has_css?(".admin-new-feature-item__learn-more")
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_emoji?
|
|
|
|
page.has_css?(".admin-new-feature-item__new-feature-emoji")
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_no_emoji?
|
|
|
|
page.has_no_css?(".admin-new-feature-item__new-feature-emoji")
|
|
|
|
end
|
2024-07-29 12:20:12 +08:00
|
|
|
|
|
|
|
def has_version?(version)
|
|
|
|
element = find(".admin-new-feature-item__new-feature-version")
|
|
|
|
element.has_text?(version)
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_date?(date)
|
|
|
|
element = find(".admin-config-area-card__title")
|
|
|
|
element.has_text?(date)
|
|
|
|
end
|
2023-11-20 06:59:04 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|