mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
UX: enhances chat copy features (#23770)
- Allows to copy quotes from mobile - Allows to copy text of a message from mobile - Allows to select messages by clicking on it when selection has started Note this commit is also now using toasts to show a confirmation of copy, and refactors system specs helpers concerning secondary actions. <!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
This commit is contained in:
27
spec/system/page_objects/components/toasts.rb
Normal file
27
spec/system/page_objects/components/toasts.rb
Normal file
@ -0,0 +1,27 @@
|
||||
# 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
|
Reference in New Issue
Block a user