FIX: Flaky spec in AI Helper modal (#208)
This commit is contained in:
parent
aa08f2d2a0
commit
8d674c451a
|
@ -62,6 +62,9 @@ RSpec.describe "AI Composer helper", type: :system, js: true do
|
||||||
expect(ai_helper_modal).to be_visible
|
expect(ai_helper_modal).to be_visible
|
||||||
|
|
||||||
ai_helper_modal.select_helper_model(OpenAiCompletionsInferenceStubs.text_mode_to_id(mode))
|
ai_helper_modal.select_helper_model(OpenAiCompletionsInferenceStubs.text_mode_to_id(mode))
|
||||||
|
|
||||||
|
wait_for { ai_helper_modal.has_diff? == true }
|
||||||
|
|
||||||
ai_helper_modal.save_changes
|
ai_helper_modal.save_changes
|
||||||
|
|
||||||
expect(composer.composer_input.value).to eq(
|
expect(composer.composer_input.value).to eq(
|
||||||
|
|
|
@ -19,6 +19,10 @@ module PageObjects
|
||||||
def select_title_suggestion(option_number)
|
def select_title_suggestion(option_number)
|
||||||
find("input#title-suggestion-#{option_number}").click
|
find("input#title-suggestion-#{option_number}").click
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def has_diff?
|
||||||
|
has_css?(".text-preview .inline-diff")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue