discourse/spec/system/page_objects/modals/post_history.rb
Natalie Tay 01d42ab524
FEATURE: Display locale change in post history modal (#33469)
This commit adds locale changes to the post history modal, and also updates
the topic's locale if the first post is being updated.
2025-07-03 23:08:47 +08:00

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