mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 01:34:13 +08:00
3e5976f843
We used to show New Features in a tab on the dashboard,
but this could get pushed down the page especially on
our hosting. In 043117ca13
we made a separate What's New page, so this commit removes
the dashboard tab and changes the admin notification to
send the admin to /admin/whats-new instead of the dashboard
tab.
43 lines
1001 B
Ruby
43 lines
1001 B
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_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
|
|
end
|
|
end
|
|
end
|