From b72ee805b6f2f0a1986c6098963111f682eeb537 Mon Sep 17 00:00:00 2001 From: Kris Date: Fri, 1 Mar 2024 14:58:33 -0500 Subject: [PATCH] DEV: update caption test for core interaction change (#503) --- spec/system/page_objects/components/ai_caption_popup.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/system/page_objects/components/ai_caption_popup.rb b/spec/system/page_objects/components/ai_caption_popup.rb index 07672a3e..e02dc309 100644 --- a/spec/system/page_objects/components/ai_caption_popup.rb +++ b/spec/system/page_objects/components/ai_caption_popup.rb @@ -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