mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 06:43:54 +08:00
28 lines
652 B
Ruby
28 lines
652 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 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
|