mirror of
https://github.com/discourse/discourse.git
synced 2024-12-30 22:34:01 +08:00
fad0d2ec62
This PR adds a small visual change to the new feature item on the `/admin/whats-new` page. When features are marked with an experimental site setting, they should show an indication on the feature item that it is "Experimental"
55 lines
1.3 KiB
Ruby
55 lines
1.3 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class AdminNewFeatures < PageObjects::Pages::Base
|
|
def visit
|
|
page.visit("/admin/whats-new")
|
|
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_toggle_experiment_button?
|
|
page.has_css?(".admin-new-feature-item__feature-toggle")
|
|
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
|
|
|
|
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
|
|
|
|
def has_experimental_text?
|
|
page.has_css?(".admin-new-feature-item__header-experimental")
|
|
end
|
|
|
|
def has_no_experimental_text?
|
|
page.has_no_css?(".admin-new-feature-item__header-experimental")
|
|
end
|
|
end
|
|
end
|
|
end
|