DEV: ensures we have error message before message check (#24647)

Previously the spec could be flakey as the long message could show on the screen while we await for processing. Now we will first check to have the error message on screen, at this point the erroneous message should never be visible.
This commit is contained in:
Joffrey JAFFEUX 2023-11-30 10:55:05 +01:00 committed by GitHub
parent 1b022457ad
commit 0b65aa8b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,8 +19,8 @@ RSpec.describe "Message errors", type: :system do
channel_page.send_message("atoolongmessage" + "a" * max_length)
expect(page).to have_no_content("atoolongmessage")
expect(page).to have_content(I18n.t("chat.errors.message_too_long", count: max_length))
expect(page).to have_no_content("atoolongmessage")
end
end
end