mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-01 17:12:11 +08:00
This commit adds locale changes to the post history modal, and also updates the topic's locale if the first post is being updated.
32 lines
684 B
Ruby
32 lines
684 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Modals
|
|
class PostHistory < PageObjects::Modals::Base
|
|
MODAL_SELECTOR = ".history-modal"
|
|
|
|
def click_previous_revision
|
|
footer.find("button.previous-revision").click
|
|
self
|
|
end
|
|
|
|
def previous_locale
|
|
body.find(".revision__locale .revision-content:nth-child(1)")
|
|
end
|
|
|
|
def current_locale
|
|
body.find(".revision__locale .revision-content:nth-child(2)")
|
|
end
|
|
|
|
def current_revision
|
|
revision_numbers.find("strong:nth-child(3)")
|
|
end
|
|
|
|
private
|
|
|
|
def revision_numbers
|
|
footer.find("#revision-numbers")
|
|
end
|
|
end
|
|
end
|
|
end
|