mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 02:43:45 +08:00
9762e65758
This commit adds a new Revise... action that can be taken for queued post reviewables. This will open a modal where the user can select a Reason from a preconfigured list (or by choosing Other..., a custom reason) and provide feedback to the user about their post. The post will be rejected still, but a PM will also be sent to the user so they have an opportunity to improve their post when they resubmit it.
39 lines
690 B
Ruby
39 lines
690 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Modals
|
|
class Base
|
|
include Capybara::DSL
|
|
include RSpec::Matchers
|
|
|
|
def close
|
|
find(".modal-close").click
|
|
end
|
|
|
|
def cancel
|
|
find(".d-modal-cancel").click
|
|
end
|
|
|
|
def click_outside
|
|
find(".modal-outer-container").click(x: 0, y: 0)
|
|
end
|
|
|
|
def click_primary_button
|
|
find(".modal-footer .btn-primary").click
|
|
end
|
|
|
|
def has_content?(content)
|
|
find(".modal-body").has_content?(content)
|
|
end
|
|
|
|
def open?
|
|
has_css?(".modal.d-modal")
|
|
end
|
|
|
|
def closed?
|
|
has_no_css?(".modal.d-modal")
|
|
end
|
|
end
|
|
end
|
|
end
|