mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-17 15:23:00 +08:00
This commit makes various changes and improvements to the new color palettes page that was introduced in https://github.com/discourse/discourse/pull/32379. Specifically, it: * Removes the ‘Logos and fonts’ banner * Removes the icon from the palette names in the list * Moves the ‘new’ button to the top of the palette list * Excludes theme-owned color palettes from the color palettes page since these will be editable directly from the theme page * Makes the name the primary text if a color has no description * Adds a button next to the name field to save just the name * Adds a ‘Delete’ button alongside the existing ‘Duplicate’ button * Adds a ‘Revert’ button to change a modified color back to its default value (based on the base palette of the palette)
31 lines
744 B
Ruby
31 lines
744 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Components
|
|
class Toasts < PageObjects::Components::Base
|
|
def has_default?(message)
|
|
has_css?(".fk-d-default-toast", text: message)
|
|
end
|
|
|
|
def has_success?(message)
|
|
has_css?(".fk-d-default-toast.-success", text: message)
|
|
end
|
|
|
|
def close_button
|
|
find(".fk-d-default-toast__close-container .btn")
|
|
end
|
|
|
|
def has_warning?(message)
|
|
has_css?(".fk-d-default-toast.-warning", text: message)
|
|
end
|
|
|
|
def has_info?(message)
|
|
has_css?(".fk-d-default-toast.-info", text: message)
|
|
end
|
|
|
|
def has_error?(message)
|
|
has_css?(".fk-d-default-toast.-error", text: message)
|
|
end
|
|
end
|
|
end
|
|
end
|