DEV: update caption test for core interaction change (#503)

This commit is contained in:
Kris 2024-03-01 14:58:33 -05:00 committed by GitHub
parent 59bab2bba3
commit b72ee805b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -7,7 +7,13 @@ module PageObjects
CAPTION_POPUP_SELECTOR = ".ai-caption-popup"
CAPTION_TEXTAREA_SELECTOR = "#{CAPTION_POPUP_SELECTOR} textarea"
def hover_image_wrapper
image_wrapper = find(".d-editor-preview .image-wrapper")
image_wrapper.hover
end
def click_generate_caption
hover_image_wrapper
page.find(GENERATE_CAPTION_SELECTOR, visible: false).click
end
@ -16,10 +22,12 @@ module PageObjects
end
def save_caption
hover_image_wrapper
find("#{CAPTION_POPUP_SELECTOR} .btn-primary").click
end
def cancel_caption
hover_image_wrapper
find("#{CAPTION_POPUP_SELECTOR} .cancel-request").click
end