discourse/spec/system/page_objects/components/review_note_form.rb
Krzysztof Kotlarek 6e39bb9728
FIX: Persist reviewable notes when toggle tabs (#35495)
When adding a note through the timeline tab, the note wasn't being
persisted to the reviewable's reviewable_notes array. This caused the
note to disappear when switching between tabs.
2025-10-21 10:23:41 +08:00

16 lines
353 B
Ruby

# frozen_string_literal: true
module PageObjects
module Components
class ReviewNoteForm < PageObjects::Components::Base
def add_note(note)
form.fill_in("note", with: note)
form.submit
end
def form
@form ||= PageObjects::Components::FormKit.new(".reviewable-note-form__form")
end
end
end
end