FIX: Flaky spec in AI Helper modal (#208)

This commit is contained in:
Keegan George 2023-09-06 10:15:11 -07:00 committed by GitHub
parent aa08f2d2a0
commit 8d674c451a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -62,6 +62,9 @@ RSpec.describe "AI Composer helper", type: :system, js: true do
expect(ai_helper_modal).to be_visible
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
expect(composer.composer_input.value).to eq(

View File

@ -19,6 +19,10 @@ module PageObjects
def select_title_suggestion(option_number)
find("input#title-suggestion-#{option_number}").click
end
def has_diff?
has_css?(".text-preview .inline-diff")
end
end
end
end