discourse/spec/system/page_objects/components/translation_composer.rb
Natalie Tay 3f8ccda7aa
FEATURE: Allow post authors to localize their own posts (#36178)
We should allow authors to localize their own content.

This is gated behind the
`content_localization_allow_author_localization` setting, which is
enabled by default.

Meta:
https://meta.discourse.org/t/feature-request-allow-users-to-localize-only-their-own-topics/389147
2025-11-25 11:02:22 +08:00

22 lines
616 B
Ruby

# frozen_string_literal: true
module PageObjects
module Components
class TranslationComposer < PageObjects::Components::Composer
def has_translation_title?(value)
expect(find("#reply-control input#translated-topic-title").value).to eq(value)
end
def select_locale(locale)
selector = ".translation-selector-dropdown"
select_kit = PageObjects::Components::SelectKit.new(selector)
select_kit.expand
select_kit.select_row_by_name(locale)
end
def fill_content(content)
find(".d-editor-input").set(content)
end
end
end
end