DEV: update caption test for core interaction change (#503)
This commit is contained in:
parent
59bab2bba3
commit
b72ee805b6
|
@ -7,7 +7,13 @@ module PageObjects
|
||||||
CAPTION_POPUP_SELECTOR = ".ai-caption-popup"
|
CAPTION_POPUP_SELECTOR = ".ai-caption-popup"
|
||||||
CAPTION_TEXTAREA_SELECTOR = "#{CAPTION_POPUP_SELECTOR} textarea"
|
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
|
def click_generate_caption
|
||||||
|
hover_image_wrapper
|
||||||
page.find(GENERATE_CAPTION_SELECTOR, visible: false).click
|
page.find(GENERATE_CAPTION_SELECTOR, visible: false).click
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -16,10 +22,12 @@ module PageObjects
|
||||||
end
|
end
|
||||||
|
|
||||||
def save_caption
|
def save_caption
|
||||||
|
hover_image_wrapper
|
||||||
find("#{CAPTION_POPUP_SELECTOR} .btn-primary").click
|
find("#{CAPTION_POPUP_SELECTOR} .btn-primary").click
|
||||||
end
|
end
|
||||||
|
|
||||||
def cancel_caption
|
def cancel_caption
|
||||||
|
hover_image_wrapper
|
||||||
find("#{CAPTION_POPUP_SELECTOR} .cancel-request").click
|
find("#{CAPTION_POPUP_SELECTOR} .cancel-request").click
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue