From 11833543211e201ab437d6ba8643fbd95fb36a21 Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Fri, 18 Feb 2022 10:52:14 +0100 Subject: [PATCH] Maintenance: Stabilize ticket zoom capybara test. --- spec/system/ticket/zoom_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/system/ticket/zoom_spec.rb b/spec/system/ticket/zoom_spec.rb index 17c00f4f6..f6f3a4ba9 100644 --- a/spec/system/ticket/zoom_spec.rb +++ b/spec/system/ticket/zoom_spec.rb @@ -2444,17 +2444,17 @@ RSpec.describe 'Ticket zoom', type: :system do # save 2 values multiselect_set(%w[value_1 value_2]) click '.js-submit' - expect(ticket.reload[field_name]).to eq(%w[key_1 key_2]) + wait.until { ticket.reload[field_name] == %w[key_1 key_2] } # save 1 value multiselect_set(['value_1']) click '.js-submit' - expect(ticket.reload[field_name]).to eq(['key_1']) + wait.until { ticket.reload[field_name] == ['key_1'] } # unset all values multiselect_unset_all click '.js-submit' - expect(ticket.reload[field_name]).to be_nil + wait.until { ticket.reload[field_name].nil? } end end